|
Sir,
Thanks for ur kind attention.
One more question.
what is the meaning of (-1D) in
Response.ExpiresAbsolute = DateTime.Now.AddDays(-1D)
Thanks
|
|
|
|
|
Hello,open this link to understand the code i send to u
http://www.codeproject.com/useritems/NoCaching.asp
|
|
|
|
|
hi,
How To Programmatically Create a DSN for SQL Server in C# ASP.NET.
kamalnath
|
|
|
|
|
|
Hi,
I am using DataReader to read data from database and comparing the values with textbox values entered(something like in login page to chk whether the user exists)but even the values are same it displays user not valid.
what r the options for comparing values?
herez my code
if((dr.GetValue(0).ToString().Equals(txtUserName.Text.ToString()))&&(dr.GetValue(1).ToString().Equals(txtPassword.Text.ToString())))
{
Response.write("User is valid");
}
else
{
Response.write("User is not valid");
}
Thanks,
Mini
|
|
|
|
|
You can use the string.Compare method to specify if the comparison should be case sensetive or not. Usually the comparison for user name is not case sensetive, but the password is.
---
b { font-weight: normal; }
|
|
|
|
|
Well one another way is that u must compare by applying == among two string like...
dr.GetValue(0)==txtUserName.Text
may be this will helpfull..
KHATRI
|
|
|
|
|
Well you can also compare the two values by applying == to them
Like
dr.GetValue(0)==txtUserName.Text
similarly u can do more..
May be this is helpfull to u
Khatri
|
|
|
|
|
I would suggest that you relegate this task to the database by changing your query and adding filter for username and password (if applicable)
As for comparison, you can make both values upper case/lower case and then compare (if they are strings) or use object comparison (for objects).
Shreekar
http://shreekarishere.blogspot.com
|
|
|
|
|
Try the following code
if((dr.GetValue(0).ToString()==txtUserName.Text.ToString())&&(dr.GetValue(1).ToString()==txtPassword.Text.ToString()))
{
Response.write("User is valid");
}
else
{
Response.write("User is not valid");
}
Thanks and Regards,
Suresh Dayma
Everything Is Possible!
|
|
|
|
|
Thanks to all..
All ur replies r working fine...
Thanks,
Mini
|
|
|
|
|
How can we check whether a certain culture is supported by the framework or not. I have 2 strings as "en-US" and "MyName". It should set the culture if I pass "en-US" and should take the default culture of the browser if i pass "MyName". Can anyone suggest.
|
|
|
|
|
You could use the CultureInfo object in the Globalization namespace. This has a contructor that takes the "en-US". Try that and in the catch you could do a Request.UserLanguages.GetValue(0)
|
|
|
|
|
guys i would like to ask how to create buttons during run time if its possible that is.
|
|
|
|
|
Dim loButton as Button = New Button
loButton.Text = "Some Text"
loButton.Visable = True
form1.Controls.Add(loButton)
You should try looking at MSDN first. You will most likly get most of these answers from there without having to wait.
|
|
|
|
|
Well i want to add few more things in the code that TadMcClellan has provided.
Provide the type of button that you want to create that is either HTML control input button or WebControl
Dim System.Web.UI.WebControl.Button as btn=new System.Web.UI.WebControl.Button()----This is for WebControl buttons..
similarly u can provide anytype of button..
May be i m helpful to u..
KHATRI
|
|
|
|
|
hi guys i am in need of syntex for asp 1.1:
connecting to an ms sql database during runtime.
i would also like to ask if it is possible to connect to the database server at the same place.
meaning if it is possible to connect to the database server and the database in the script while in run time.
|
|
|
|
|
Um.. Yes. Actualy this is how you should do it, using some common object to open the connections and commands for you and returning the datatables you need.
If you use C# be sure to use the "Using" Syntext. In 1.1 VB.Net you can't do this so be sure to close the connection after your done with it.
If you need help with Conection Strings go Here[^].
Do an MSDN Search on SQLConnection and that will give you the syntext you need.
|
|
|
|
|
In my asp.net 2.0 app I have the following line in my web.config assemblies section:
add assembly="Microsoft.mshtml, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"
(I took out the angle brackets becuase the forum was causing it all to hide)
I didn't put it there, and in fact when I take it out, as soon as I start a debug run it puts it back automatically. Normally no sweat off my back, but the Windows 2003 server I'm testing on doesn't like it at all and chokes on it. I remove it from that server's web.config and it runs just fine, all features that I can tell so far.
Is it being added to support debugging through IE or...?
|
|
|
|
|
ACT Application Center Test (perhaps the most awkward product name ever)
I have a license for ACT with my vs 2003 but found it appeared to freeze while building a script by browsing on my 10 user limited xp pro IIS on my dev station with a particularly complex ajax intensive form. I'm not sure if the problem is that it's just getting too old to deal with modern stuff like ajax and .net 2.0 or it's just my 10 connection limited web server which I have run up against from time to time while debugging.
I'd love to know if anyone is still using it with modern asp.net apps and if there is a chance it will work properly with the windows 2003 test server I'm going to ultimately be load testing on.
|
|
|
|
|
Hi ,
Using PostbackURL property in ASP.NE 2 to pass the values of controls between pages
Now if we have different controls in page 1 and we link page1 to page 2 by setting the PostbackURL property of link button in page1 to be linked to page 2
And in page 2 we use Request.form[“Control Name”] to get the values of some controls of page 1
Is this impact the performance of application ( slowness ) if page 1 contain a lot of controls ?
|
|
|
|
|
No. If you are using Request.Form, you are reading the values directly from the form data sent from the browser. It doesn't involve the server controls of the first page at all.
---
b { font-weight: normal; }
|
|
|
|
|
Ok thanks
Im using master pages, when i use PostBackURL with button control to pass the values of controls in page 1 to page 2 its give me the follwing exception
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
But when I use it with normal pages that not use master pages its work with postbackurl in page 1 and request.form in page 2 to get the values of controls in page 1
why its nor working withe pages that use master pages
|
|
|
|
|
The id of controls inside containers, like in master pages, gets the id of the container prepended to it. Check the source of the html page to see what the field's names are.
---
b { font-weight: normal; }
|
|
|
|
|
Hey guys i have a small problem.... im sure you can help
I have a new project, with 2 buttons on Button1 and Button2... The code behind button1 is simple:
Textbox t = new Textbox();
t.Text = "hello world!";
form1.Controls.Add(t);
when i click Button1 - wow! it adds the control! No problem, i noticed that i can click the button as many times as i want and only 1 textbox ever appears. so Click button1, then click Button2 - POW! its vanised!
Whats the correct method of keeping a control "alive" on a page (as well as preserving any events it has?)
Cheers
Will
|
|
|
|