I want to display a prompt message when he is redirceted from a special page, how can accomplish this? Passing messsage as paramater is not so pretty. a used a booling paramater to determinig situation to display message.
+1
A:
Why not pass the boolean in ViewData
(whether to display the message) based upon interrogating Request.ServerVariables["http_referer"]
in your controller?
in controller
ViewData["DisplayMessage"] =
Request.ServerVariables["http_referer"] == "http://Special.com";
in view
<% if ((bool)ViewData["DisplayMessage"])){ %>
<div>YOUR MESSAGE</div>
<% } %>
Kindness,
Dan
Daniel Elliott
2009-11-21 08:50:17
So i need to define so many message in detination page for each source page, and if a new page being added i should change detination page.that's not so good!
mehran
2009-11-25 12:23:29