Groups | Blog | Home
all groups > asp.net datagrid control > december 2004 >

asp.net datagrid control : Redirect and passing url from within a datagrid


AKJTR
12/30/2004 12:49:04 PM
I finnal got everyhting to work using

<asp:HyperLink Runat="server" Text =
'<%#DataBinder.Eval(Container.dataitem,"pdd_book") + " " +
DataBinder.Eval(Container.dataitem,"pdd_page")%>' Target = _blank NavigateUrl
= '<%#
"http://www.dnr.state.ak.us/recorders/cad_search.cfm?District=401&SearchType=book&Book="
+ DataBinder.Eval(Container.dataitem,"pdd_book") + "&Page=" +
Databinder.Eval(Container.DataItem,"pdd_page")%>'></a>

Its a template column in a datagrid that inserts some selected data into a
url and then opens a new window using that url (querys someone elses
database).

Now they want an disclaimer page in between, that informs the user they are
leaving our site and going to somewhere elses.
My ? is how to create a disclaimer page and still pass the dynamic url.
Clear as mud?

Scott Mitchell [MVP]
1/4/2005 7:41:56 PM
[quoted text, click to view]

You could create a new page, Disclaimer.aspx, that took in a URL through
a querystring parameter. This Disclaimer page would display the
disclaimer and provide a link to the URL in the querystring. So you'd
visit something like:

www.yoursite.com/Disclaimer.aspx?URL=http://someothersite.com/blah.aspx

This would display the disclaimer and provide a link to
http://someothersite.com/blah.aspx.

Make sense? Essentially you need to introduce an intermediate page
(Disclaimer.aspx). hth

--

Scott Mitchell [ASP.NET MVP]
mitchell@4GuysFromRolla.com
AddThis Social Bookmark Button