|
hi friends
how to create search option in asp.net (eg;google).
any code please send me
thanx
regards
saravanan
|
|
|
|
|
Try this[^].
Jon Sagara
I controlled my laughter and simple said "No,I am very busy,so I can't write any code for you". The moment they heard this all the smiling face turned into a sad looking face and one of them farted. So i had to leave the place as soon as possible.
--Mr.Prakash
Blog | Site | Articles
|
|
|
|
|
Hello all:
We have an application that is written in Classic ASP which requires users to login (same as forms authentication in .NET). We need to add some more pages to this application which will be written in ASP.NET 2.0
When a user logs in, he/she uses the classic ASP interface to use their user IDs and passwords which verifies them.
Any ideas as to how I can take care of the authentication and still be able to use ASP.NET 2.0 classes to verify that the user has been authenticated?
Will I need extend any of these classes?
Any help will be appreciated. Thanks.
Robert
|
|
|
|
|
I wrote a service that used the sessionId ( from memory ) to copy the session variables between ASP and ASP.NET. That worked well.
Your core issue is, anything you can't pass on the URL, your two projects won't be able to share, by default. I believe I passed the ID to ASP.NET on the URL, which it used to get session variables from the service. Obviously, the asp app had to stuff them in as well.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
My Asp.net 2.0 pages need the client browser to have JavaScript enabled, and this must be detected immediately after the Page load so if the browser does not support the javascript I will redirect the user to some other page, but I don't know how to do that.
In addition, the Request.Browser.JavaScript and Request.Browser.JScript do not work when the browser supports the JavaScript but the user has disabled it!
Please help me detect if the user's browser is JavaScript enabled or not.
Sojaner!
|
|
|
|
|
Use Javascript in the onload event of the page to redirect to one page, and a meta tag to redirect to another page.
---
Year happy = new Year(2007);
|
|
|
|
|
What kind of meta tag?
And also I want the user to stay at the current page if his browser is javascript enabled and redirect him if his browser is javascript disabled.
Sojaner!
|
|
|
|
|
Sojaner wrote: What kind of meta tag?
http-equiv="refresh"
Sojaner wrote: And also I want the user to stay at the current page if his browser is javascript enabled and redirect him if his browser is javascript disabled.
It might be possible, but there is no obvious way to do it. The problem with that is that it's impossible to detect if Javascript is disabled, you can only detect if it's enabled. If it's disabled, there is nothing that you can use to do the detecting.
-- modified at 2:52 Friday 19th January, 2007
---
Year happy = new Year(2007);
|
|
|
|
|
But I know a website that is written in CGI and immediately after you enter the main page, it detects that you javascript is disabled and redirects you to some html page that tells you to enabled the javascript!
I don't care about the difference between detecting that the javascript is disabled or it is enabled! I just want to make the user, enable the javascript, when he enters my page!
For example, I use Firefox 2.0, and I have installed an add-on name "No Script" that blocks the javascript scripts until you allow them to run, but when I'm debugging my code, using Firefox, my code could not detect that the javascript scripts are blocked! Although the tags work correctly when this add-on block the scripts, but the Request.Browser.Javascript is true!
Sojaner!
|
|
|
|
|
Hi,
I want to use the autocomplete feature from Yahoo UI Library with a webservice call to the database in my ASP.Net application. (I dont want to use ATLAS-AJAX) I want to achieve something like this (as given below) but instead of using a static array i want to connect to the db using webservice in my ASP.NET application
<!-- Dependencies -->
<script type="text/javascript" src="yahoo.js"></script>
<script type="text/javascript" src="dom.js"></script>
<script type="text/javascript" src="event.js"></script>
<!-- Source file -->
<script type="text/javascript" src="autocomplete.js"></script>
<input id="myInput" type="text">
<div id="myContainer"></div>
<script type="text/javascript">
// A JavaScript Array DataSource
var statesArray = [
"Alabama",
"Alaska",
"Arizona",
"Arkansas",
"California",
"Colorado",
"Connecticut",
"Delaware",
"Florida" // Entire array not shown
];
var myDataSource1 = new YAHOO.widget.DS_JSArray(statesArray);
var oAutoComp = new YAHOO.widget.AutoComplete("myInput","myContainer", myDataSource1);
</script>
I have this code below which uses the Atlas-ajax feature to perform the autocomplete. But want to add the missing code using YUI syntax using webservice (BLOCK 2)
BLOCK 1
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<atlas:AutoCompleteExtender ID="AutoCompleteExtender1" runat="server">
<atlas:AutoCompleteProperties Enabled="true"
MinimumPrefixLength="1"
TargetControlID="TextBox1"
ServicePath="~/Services/ProductService.asmx"
ServiceMethod="FindProducts" />
</atlas:AutoCompleteExtender>
BLOCK 2
<div id="statesmod">
<form onsubmit="return YAHOO.example.ACJSArray.validateForm();">
<h3>Find a product:</h3>
<div id="statesautocomplete">
<input id="statesinput">
<div id="statescontainer"></div>
</div>
</form>
</div>
oACDS = new YAHOO.widget.????????
?????
Does anybody have any links/pointers to the Yahoo UI objects and usage of webservices. So ideally BLOCK 1 and BLOCK 2 should return values from the db using ProductService.asmx
Thanks in advance.
PJ
|
|
|
|
|
Hello everyone
I have a weird problem with the cookies issue in a website developed with asp .net 2.0. This is the situation: First this website was developed on a PC (Development PC) with Windows XP Professional SP2 in VS .NET 2005 - ASP.NET 2.0. In this PC the website runs PERFECTLY!! Then I installed this same website in a Quality server that has Windows server 2003 to test the website before deploying it to the Production server. Obviously, this QA server has the .net framework 2.0 installed and the QA database for this website is already installed with persistent data. When I ran the website in this QA server, the login page appeared perfectly, and when I clicked on login, mysteriously, the browser (Internet explorer 6.0) redirects AGAIN to the login page leaving in blank the textfields where I typed down the user and the password. This thing doesn't happen in the development PC!! In there, when you click on login, the user is authenticated and the browser goes to the main menu page. That is the normal flow. I already discarded the possibility that the user wasn't authenticating. I already checked this in the QA server. I'm sure this is a cookie problem. By default, the authentication part in the web.config is like this:
<authentication mode="Forms">
<forms loginurl="Login.aspx" protection="All" timeout="30" name="SIGOSecCookie" path="/SIGOWeb" requiressl="false" slidingexpiration="true" defaulturl="Default.aspx" cookieless="UseCookies" enablecrossappredirects="true">
Then I made a change in the cookieless attribute setting it to "UseUri" and when I did that, the website in the QA server WORKED PERFECTLY!! I mean, the browser redirected to the main menu page instead of going back to the login page!! But I can't leave that cookieless mode to UseUri!, I have to leave it in UseCookies because in the development PC the website works with UseCookies and the company wants it like that. In summary, the website in QA works perfectly if I set the cookieless to UseUri but works bad (it redirects to the Login page) If I set it to UseCookies.
Note: It is important to mention that the IIS configuration for the website is just the same in each PC. The login page has the login component of ASP .NET 2.0 and uses the Membership and Provider thing to authenticate the user (As I told you the athentication part works fine, don't worry about that), The DestinationUrl for this login component is Default.aspx (this page is the one with the main menu)
How can I solve this issue leaving the cookieless in "UseCookies"? I would be very grateful if you help me with this problem, I've been for 2 weeks trying to figure it out but I haven't solved it. I hope your answer and thank you.
Sincerely,
Agustin Conde
|
|
|
|
|
Im working on an intranet, it requires the domain username to build the correct SQL Instructions, i've got it whit the following:
currentUser = Request.ServerVariables["LOGON_USER"].ToString();
but i also require to use the integrated security option on the Connection String (to manage user privileges, i dont want lo let them enter with sa), and when i run my application appears:
" Login failed for user 'DOMAIN\MACHINE$'. "
Can somebody help me?
thank's
|
|
|
|
|
i want to sort grid view control by just click on header of the column...
does any one know abt its implementation..?
i know that i need to write event handler for that...
but i dont know how to write it?
plz help me
my code is in C#
thank u in advance.
|
|
|
|
|
|
Hi, is it possible if i can reference the asp:link button id in javascript so within the javascript function i can do something like make link button enabled
i tried doing something like that in javascript didn't work. Can somebody help me in it.
<asp:linkbutton id="mylinkBtn" onclientclick="return Showme();" runat="server">
function Showme()
{
document.getElementById("mylinkBtn").Enabled=true;
}
|
|
|
|
|
try something like this :
<br />
document.getElementById("<%=mylinkBtn.ClientID %>").disabled="disabled"; <br />
|
|
|
|
|
Hi, Thanks but
i tried doing like
document.getElementById("<%=mylinkBtn.ClientID %>").enabled="enabled";
this didn't work. I mean my mylinkBtn control didn't get enabled.
is there any tutorial or something where i can check what are the properties like enabled, disabled,visble...etc
|
|
|
|
|
<br />
document.getElementById("<%=mylinkBtn.ClientID %>").disabled=true;<br />
Check this article[^]
|
|
|
|
|
As the LinkButton control would be rendered as a tag at run-time and this tag does not have any attribute to enable or disable it, it would not be possible but if you use a HTML Button element or even a asp:button, both would be rendered as a tag and it would support the disabled attribute and so you can write your code like this:
<br />
<script language="javascript"><br />
function Showme()<br />
{<br />
var button = document.getElementById("myButton");<br />
button.disabled = false;
}<br />
</script><br />
Sojaner!
|
|
|
|
|
hi,
why should we use Autopostback=true, when we want to use listindex change event??
i saw few examples, they are saying that we have to use autopost back but why should we use it is no one explained.
thanks,
Rahi
If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
|
thanks.
If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
hi all,
my problem is in previous ASP.NET (VS 2003) writing a
function that grabs a string value from a textbox is as easy as:
dim str as string = me.TextBox1.Text
but with visual studio 2005 I can't do this simple way because the class for
that form is placed in the app_code folder and it will not see non of the
web controls on the web form, so saying:
dim str as string = me.TextBox1.Text will not work and it complains about
the TextBox1 is not defined. in more details, I have a function was working
in visual studio 2003 that calls a stored procedure in sql server 2005, this
function passes a variables (3 variables) from a 3 textboxes on the form.
And I am calling this function everytime the user changes the value of one
of these textboxes.
now since the migration, visual studio 2005 puts all classes under App_Code
folder (as one of their new features!!) moving my function under the
App_Code folder prevents me from calling/Getting the values of those
textboxes as they change why? because the class can't see those controls
sitting on the form!
I am going crazy with this. Does anyone know?
thanks for your help.
|
|
|
|
|
Just use the code behind page. When you add a web form make sure you check the 'Place code in separate file' checkbox then there should be a little plus sign next to the .aspx page, when you expand it you'll see a .aspx.cs (or .aspx.vb depending on language) file where you can do all you work with the controls. app_code is for more universal code like business logic (though I normally make another project in the solution for this), server controls, or help classes.
|
|
|
|
|
thanks eggsovereasy for your reply,
this is a very good news, because i was chatting with some guys and they told me that i HAVE to follow the new format (App_Code) and the old VS 2003 is being discontinued and it would increase performance or something like that. anything true to that?
plus, do u have any idea if a project has already been migrated and(all classes being moved to the App_Code folder), if there is a way to move all those classes back behinde their forms? or i have very much to re-migrate?
-- I just did a re-migration and there is no option or checkbox to force visual studio to use code behinde page! any idea?
thanks a lot
-- modified at 12:04 Thursday 18th January, 2007
|
|
|
|