Submit Button

K

Kevin Bilbee

I have a web form with a few text fields some validataion and a submit
button.

When I click the submit bittin the serverside event does not fire?????
Why!!!! I have tried Changing the EnableViewState I have tried removing
CausesValidataion.
I am using VisualStudio 2003/.net 1.1

<asp:Button id="submit" runat="server" Text="Update" EnableViewState="True"
CausesValidation="true"></asp:Button>


private void InitializeComponent()
{
this.submit.Click += new System.EventHandler(this.submit_Click);
this.Load += new System.EventHandler(this.Page_Load);
}
#endregion
private void submit_Click(object sender, System.EventArgs e)
{
Response.Write("This is the button clicked");
// Update the users file here
userRec.Replace(txtName.Text,14,0,0);
userRec.Replace(txtEmail.Text,13,0,0);
userRec.Replace(txtFax.Text,21,0,0);
userRec.Replace(txtVoice.Text,19,0,0);
tblEUsers.Write(userId,userRec);
if (txtPass.Text != "") // save the password
{
}
}

Kevin Bilbee
 
B

bruce barker

the property Page.IsValid is what fires the validation event. you must
check in you page somewhere.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,773
Messages
2,569,594
Members
45,118
Latest member
LatishaWhy
Top