joe_pool_is Posted March 24, 2004 Posted March 24, 2004 In my webform's VB code, after a user clicks btnSubmit on my form named Quote.aspx, I gather the info on the form and email it to myself. I would like to be able to redirect my user to a new page - say SubmitOK.aspx, located in the same directory. How would I tell Quote.aspx to load SubmitOK.aspx from the webform VB code in Quote.aspx? Quote Avoid Sears Home Improvement
Arch4ngel Posted March 24, 2004 Posted March 24, 2004 Response.Redirect("SubmitOK.aspx"); Quote "If someone say : "Die mortal !"... don't stay to see if he isn't." - Unknown "Learning to program is like going out with a new girl friend. There's always something that wasn't mentioned in the documentation..." - Me "A drunk girl is like an animal... it scream at everything like a cat and roll in the grass like a dog." - Me after seeing my girlfriend drunk and some of her drunk friend. C# TO VB TRANSLATOR
Moderators Robby Posted March 24, 2004 Moderators Posted March 24, 2004 Joe, if you are redirecting to a page on the same server and you would like to mantain viewstate use Server.Transfer("SubmitOk.aspx") Quote Visit...Bassic Software
joe_pool_is Posted March 26, 2004 Author Posted March 26, 2004 Thanks, Robbie! That worked great! If you have a minute, I have another question. Heres some background info: These forms of mine each have about 50 different fields; most are TextBoxes, but some are ComboBoxes and there are a few True/False RadioBoxes. It is taking a very long time to go through each of these objects to assign them an associated name (i.e. Name field gets named txtName). Not only that, but my btnSubmit and btnReset also require a tremendous amount of "busy work" coding, too. For my btnReset_Click event, every object on my form has to be manually set (each TextBox.Text = "", each ComboBox.SelectedIndex = -1, and each radDefault.Checked = True). For my btnSubmit_Click event, every object on my form similarly is collected into a strString (strString = TextBox.Text, strString &= ComboBox.SelectedItem.Text, or a True/False If...Then statement for the RadioButtons). Obviously, there must be a more intelligent method of doing this. Would you (or anyone else) happen to know of a technique/trick that would simplify this monster? Thanks for the help! ~Joe Quote Avoid Sears Home Improvement
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.