Page 1 of 1

Submit Button

Posted: Mon Nov 02, 2015 7:20 am
by ZPCAC
Hello -

I am working through some udates on our webstore and i would like to have a button that once is clicked submits the information and close the webpage. Below is the current code for the button.

<asp:Button ID="Submit" runat="server" Text="Submit Tab Titles/Colors" OnClick="close" ValidationGroup="ContactUs" />
&nbsp;&nbsp;&nbsp;<asp:Button ID="reset" OnClientClick="document.location.href=document.location.href;" Text="Reset" runat="server" />

Any help would be appreciated !

Bret

Re: Submit Button

Posted: Mon Nov 02, 2015 7:54 am
by mazhar
Where do you want to submit the information when Submit button is hit? In ASP.NET you have to write some server code to handle the button click and then redirect user to some different page.

Re: Submit Button

Posted: Mon Nov 02, 2015 8:00 am
by ZPCAC
mazhar wrote:Where do you want to submit the information when Submit button is hit? In ASP.NET you have to write some server code to handle the button click and then redirect user to some different page.
below is the code that links to our root directory

[[ConLib:custom/CustomIndexing3 SendTo="customerservice@zackproducts.com" EnableCaptcha="false" Subject="Custom Indexing Order"]]

The Send to : customerservice@zackproducts.com is where the form is submitted

Re: Submit Button

Posted: Mon Nov 02, 2015 8:09 am
by mazhar
Look for the code file. For example there could be CustomIndexing3.ascx.cs file containing the code to handle button click. If you are using AbleCommerce contactus control then look for following function.

Code: Select all

protected void Submit_Click(object sender, EventArgs e)
        {
            
        }
Put redirect code just above the close curly brance } like

Code: Select all

protected void Submit_Click(object sender, EventArgs e)
        {


            Response.Redirect("Default.aspx");
        }