Hi, i have code that opens an Ms outlook new email message window on myGridviews' ItemUpdated event. I did this because of the easy with which users will find email addresses to send messages to with out the pain of remembering or cramming the so many company employee email accounts. After sending the email, outlook closes which is okay to me but the problem is, i now remain with a blank page instead of returning to the page with my Gridview from where i fired the update event that opened outlook. I wish i had away of posting or redirecting to another page or even better returning to the same page from ItemUpdated event that opened outlook was fired from. Iam not sure if this explaination is clear to any one reading it but below is the code iam talking about.
ProtectedSub GridView1_RowUpdated(ByVal senderAsObject,ByVal eAs System.Web.UI.WebControls.GridViewUpdatedEventArgs
Response.Redirect(mailto:my-email-account@dotnet.itags.org.ppp.co.ug
Response.redirect("Default.aspx") 'Why is this line of code not redirecting to Default.aspx
END SUb
Option Two: How can i open outlook when an event fires without using Response.Redirect because that is exactly what what is bringing me all this mess.
Dont use a Response.Redirect(), just use an HREF...
Your first response.redirect changes the page you are on, so the second one never fires.
Why not just show the email address when your user updates the row? Or use a pop-up to display the email address for the user to click.
Try creating a hidden iframe and setting the location of the iframe to the mailto address. This might do the trick, but I haven't tested it.
--JJ
This is my scenerio. when a row is updated, basically we are talking about a name field which is initially null being filled with an employee name. So when the user clicks update after typing the employee name in this field, On the itemUpdate event of this particular Gridview, outlook opens and then the administrator doing the update should lookup the email address in outlook of the same employee whose name was entererd prevously. The aim is to send a notification email that he has been assigned a record he/she should take charge of.
So at the end of the operation, a record should have been updated and an outlook email(not automatic) should have been send to the employee whose name was entered in the Gridviews' name field.
How do you use HREF in an event handle sub procedure.
By HREF, Curt means a HyperLink. You need to use a hyperlink and open a popup to send the mail
<a href="http://links.10026.com/?link=my-email-account@.ppp.co.ug" target="_blank">Send Mail</a>
Thanks
0 comments:
Post a Comment