开发者

i want to connect one aspx webpage to another

开发者 https://www.devze.com 2022-12-25 06:25 出处:网络
I want to connect one webpage t开发者_StackOverflow中文版o another using a command button called email. When the user clicks on the email button it should take them to another webpage where the user c

I want to connect one webpage t开发者_StackOverflow中文版o another using a command button called email. When the user clicks on the email button it should take them to another webpage where the user can select the emails they want to send to. Then they will click the OK button and it will return them to the previous webpage where they can type in their email and write a message and hit submit.


To do this, you can use the asp.net Session object. Session allows you to save information, such as a list of email addresses into memory, and retrieve them on another page.

Here's the basic article on Session, including a bunch of how-to's.

From a logic flow perspective:

  1. Main form page loads
  2. User completes one or more fields
  3. User clicks "Select Emails" button
  4. In the button click event handler, store all completed form values in Session, and redirect to second .aspx page
  5. User selects some email addresses and clicks Okay
  6. In code behind of email .aspx page, in your okay button click event handler, store which email addresses were selected in Session, then redirect back to the Main form.
  7. During page load on the Main form, check for page is not postback, and if the session values exist, use them to populate the form.
  8. During form submission (where an email should be created), use the email list previously set it Session, to populate the 'to' list.
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号