make sure all your ASP.NET tags are inside a <form runat="server" id="blahblah"></form> set then the validators message will go away. Hope this helps.
Jace
Page_Validators is an array of validator objects written in javascript on your page. Make sure all your controls are inside the <form runat="server" > tag and are you using the validators in an "if" condition?
Thanks
Actually i m using a condition based html coding like this:
<% if condn. then
execute this html code
form
/form
else
execute this html code
form
/form
Is the multiple declaration of the forms a cause of error?
This is the line which is giving error:
if (typeof(clientInformation) != "undefined" && clientInformation.appName.indexOf("Explorer") != -1) {
^^^^^ error is being reported at this position.
Thats classical way of ASP programming and so is why your error. Your page should contain only one <form> tag with runat = server. You can use the code-behind of the aspx page, to display the content based on the if condition.
Thanks
Html code on vb page? Seems interesting. Can u elaborate on this with some sort of example?
What exactly you are looking to accomplish? Post more details so that i can give you an example.
Thanks
Well i have a registration form & as soon as user submits the form, his information is entered into DB. Then user is shown his login details like id & password as well as a button to direct him to login page. I want to accomplish both registration as well as display of user info. on same page. Thats why i had used that classic ASP if-else structure. The condition that i used was like this: if IsPostBack and isregister=true(this is set true as soon as info is successfully entered into DB.) then html code for displaying user info else html code for displaying registration form.I hope u got it? If not then tell me a way to post the code so that u can have a better idea of it.
Ok. Place a Panel on your form and add the controls on which you want to show the login details to the panel and set the panel visibility to false.
On the Button Click event,
protected void Button1_Click(object sender, EventArgs e)
{
// do your code to save the values into the database
// after you successfully finish the database insertion, the same values you want to display
LabelUser.Text = "user name you entered to database";
... all other information
// set the panel visibility to true
Panel1.Visible = true;
}
Thanks
0 comments:
Post a Comment