user305112
user305112

Reputation: 1

i want to connect one aspx webpage to another

I want to connect one webpage to 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.

Upvotes: 0

Views: 830

Answers (1)

KP.
KP.

Reputation: 13730

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.

Upvotes: 2

Related Questions