Submit Button

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Kevin Bilbee

    #1

    Submit Button

    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
    CausesValidatai on.
    I am using VisualStudio 2003/.net 1.1

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


    private void InitializeCompo nent()
    {
    this.submit.Cli ck += new System.EventHan dler(this.submi t_Click);
    this.Load += new System.EventHan dler(this.Page_ Load);
    }
    #endregion
    private void submit_Click(ob ject sender, System.EventArg s e)
    {
    Response.Write( "This is the button clicked");
    // Update the users file here
    userRec.Replace (txtName.Text,1 4,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


  • bruce barker

    #2
    Re: Submit Button

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





    "Kevin Bilbee" <kbilbee@standa rdabrasives.com > wrote in message
    news:O$p#onySDH A.2148@TK2MSFTN GP12.phx.gbl...[color=blue]
    > 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
    > CausesValidatai on.
    > I am using VisualStudio 2003/.net 1.1
    >
    > <asp:Button id="submit" runat="server" Text="Update"[/color]
    EnableViewState ="True"[color=blue]
    > CausesValidatio n="true"></asp:Button>
    >
    >
    > private void InitializeCompo nent()
    > {
    > this.submit.Cli ck += new System.EventHan dler(this.submi t_Click);
    > this.Load += new System.EventHan dler(this.Page_ Load);
    > }
    > #endregion
    > private void submit_Click(ob ject sender, System.EventArg s e)
    > {
    > Response.Write( "This is the button clicked");
    > // Update the users file here
    > userRec.Replace (txtName.Text,1 4,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
    >
    >[/color]


    Comment

    Working...