Hello All,
I have developed a web form which gets the details of the user like "First name, last name, emp id, and few more details related to the application" through text box fields. The form contains 3 buttons Next, Submit and cancel buttons.
On clicking the submit button, the application sends mail to the concerned people with the details of the employee information taken from the text box of the form.
For one employee details, the form works fine. Sends information of one employee details through mail.
Now, the requirement is that the person can enter more than one employeer details. For that purpose, i have the "Next " button. On finishing with the entry of one employee, the next button is clicked to get the details of the next employee. I need to append all these information of employees and put the value together in the subject of the mail and then finally when user clicks on the submit button, the mail should be sent with all the employee details (can be 1 , 2, 3 no. of employee detailsetc etc)
Can anyone help me and let me know how to acheive this?
Thanks,
Neeraja
have the Next append the values to a Session variable and the Submit button read that first, then append the current page.
Make sure to clear the Session variable on Submit, so you dont get repeats.
Thanks Curt for the information.
Since i am new to .NET and have just started learning, can you please elaborate more on this and provide me with the links where i can find few samples of the same.
Best Regards,
Neeraja
Its the same thing you are doing now, just use a Session variable
Session("myVar") = "something"
or
Dim myVar as String = CStr(Session("myVar"))
My mail body has something like this
mail.Body="<HTML><BODY> First Name : " + TFName.Text + "<BR>" +
"Last Name : " + TLName.Text + "<BR>" +
"Employee No : " + TEmpNo.Text + "<BR>" +
"Manager : " + TMgr.Text + "<BR>" +
"Class Id : " + DropDownList1.SelectedItem.Value + "<BR>" +
"Tel No. : " + TTelNo.Text + "<BR>" +
"Email Addr : " + TEmailAdd.Text + "<BR>" +
"Server : " + RadioButtonList1.SelectedItem.Value + "</BODY></HTML>";
For one employee details, i am able to send the values. Suppose the user wants to enter the employee details of 4 employees, can i store all the 4 set of values in session and then retrieve them in the mail body when i "submit" the form.
so when i submit the form, i want all the 4 employee details that the user has entered by using the "Next" button to go into the mail body. Something like
mail.Body="<HTML><BODY> First Name : " + TFName.Text + "<BR>" +
"Last Name : " + TLName.Text + "<BR>" +
"Employee No : " + TEmpNo.Text + "<BR>" +
"Manager : " + TMgr.Text + "<BR>" +
"Class Id : " + DropDownList1.SelectedItem.Value + "<BR>" +
"Tel No. : " + TTelNo.Text + "<BR>" +
"Email Addr : " + TEmailAdd.Text + "<BR>" +
"Server : " + RadioButtonList1.SelectedItem.Value +
First Name : " + TFName.Text + "<BR>" +
"Last Name : " + TLName.Text + "<BR>" +
"Employee No : " + TEmpNo.Text + "<BR>" +
"Manager : " + TMgr.Text + "<BR>" +
"Class Id : " + DropDownList1.SelectedItem.Value + "<BR>" +
"Tel No. : " + TTelNo.Text + "<BR>" +
"Email Addr : " + TEmailAdd.Text + "<BR>" +
"Server : " + RadioButtonList1.SelectedItem.Value +
First Name : " + TFName.Text + "<BR>" +
"Last Name : " + TLName.Text + "<BR>" +
"Employee No : " + TEmpNo.Text + "<BR>" +
"Manager : " + TMgr.Text + "<BR>" +
"Class Id : " + DropDownList1.SelectedItem.Value + "<BR>" +
"Tel No. : " + TTelNo.Text + "<BR>" +
"Email Addr : " + TEmailAdd.Text + "<BR>" +
"Server : " + RadioButtonList1.SelectedItem.Value +
First Name : " + TFName.Text + "<BR>" +
"Last Name : " + TLName.Text + "<BR>" +
"Employee No : " + TEmpNo.Text + "<BR>" +
"Manager : " + TMgr.Text + "<BR>" +
"Class Id : " + DropDownList1.SelectedItem.Value + "<BR>" +
"Tel No. : " + TTelNo.Text + "<BR>" +
"Email Addr : " + TEmailAdd.Text + "<BR>" +
"Server : " + RadioButtonList1.SelectedItem.Value
"</BODY></HTML>";
Please clarify.
Thanks in advance
Neeraja
Just use a String that you add to, then set the Mail.Body = CStr(Session("myString"))
0 comments:
Post a Comment