Need Help with Button Function

For general questions and discussions specific to the AbleCommerce GOLD ASP.Net shopping cart software.
Post Reply
ZPCAC
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 40
Joined: Wed Apr 16, 2014 11:08 am

Need Help with Button Function

Post by ZPCAC » Mon Nov 16, 2015 12:58 pm

Hello :

I have a link that opens up into a popup that uses will submit info and then click the submit button to turn in their information.
if the user has properly filled the form out, the webpage will be redierected to another product page. Ideally we would like the page to close after the user submits their info.

Below is a snippet of code from the redirect (.aspx.cs)

EmailClient.Send(mailMessage);
//MessageLabel.Text = _successMessage;
//MessageLabel.ForeColor = System.Drawing.Color.Red;
Response.Redirect("~/Human-Resource-Build-a-Folder-7281-Series-P2984.aspx");

Below is a snippet of code from the button itself (.aspx)

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

again we would like the users information to submit and the window to close once the submit button has been clicked.

Thank you !

User avatar
AbleMods
Master Yoda
Master Yoda
Posts: 5170
Joined: Wed Sep 26, 2007 5:47 am
Location: Fort Myers, Florida USA

Re: Need Help with Button Function

Post by AbleMods » Tue Nov 17, 2015 3:46 pm

You haven't really said what isn't working. Have you run the visual studio debugger to see what is happening?

If the redirect is actually happening, the popup will automatically disappear when the new page is rendered. If that isn't the case, then your code isn't reaching the redirect line.
Joe Payne
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com

Post Reply