HighTechTalks DotNet Forums  

passing a token from pageA.aspx to pageB.aspx

ASP.net Building Controls microsoft.public.dotnet.framework.aspnet.buildingcontrols


Discuss passing a token from pageA.aspx to pageB.aspx in the ASP.net Building Controls forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Jay
 
Posts: n/a

Default passing a token from pageA.aspx to pageB.aspx - 10-10-2006 , 02:34 PM






I am trying to get pageA.aspx gridView to pass a key (say deptID) to
pageB.aspx which will use the value passed as a filter in it's own griView
query.
On pageA gridView I have a hyperlinkField with navigateURL property =
~/pageB.aspx?deptID={0} and it is bound to deptID (which is another column in
the grid). Also, the hyperlinkField it has its dataTextFormatString =
~/pageB.aspx?deptID={0}. PageB datasource has a where clause, where deptID =
{0}.
At runtime, the hyperlink appears to populate correctly with values such as
pageB.aspx?deptID=100, etc., byt when I click on it, pageB appears with the
token still set to deptID={0}.
I am new to webforms, can someone please help? Why doen't the
hyperLinkField pass the deptID value in the url token?
Thanks,
Jay

Reply With Quote
  #2  
Old   
John Saunders
 
Posts: n/a

Default Re: passing a token from pageA.aspx to pageB.aspx - 10-10-2006 , 02:47 PM






"Jay" <gunderj (AT) ommunity (DOT) nospam> wrote

Quote:
I am trying to get pageA.aspx gridView to pass a key (say deptID) to
pageB.aspx which will use the value passed as a filter in it's own griView
query.
On pageA gridView I have a hyperlinkField with navigateURL property =
~/pageB.aspx?deptID={0} and it is bound to deptID (which is another column
in
the grid). Also, the hyperlinkField it has its dataTextFormatString =
~/pageB.aspx?deptID={0}. PageB datasource has a where clause, where
deptID =
{0}.
At runtime, the hyperlink appears to populate correctly with values such
as
pageB.aspx?deptID=100, etc., byt when I click on it, pageB appears with
the
token still set to deptID={0}.
I am new to webforms, can someone please help? Why doen't the
hyperLinkField pass the deptID value in the url token?
Apparently, you have two different "run" times here. One where the hyperlink
is properly filled in, and one where it goes to the wrong place.

Perhaps you're looking on the server at the hyperlink control when you see
the correct value? Well, the client has an HTML anchor (<a>) element
instead. You should try to find the <a> on the cliekt-side page using View
Source or the IE Developer Toolbar, and see what the href attribute is set
to. I bet it's set to deptID={0}.

Then, all you'll have to do is figure out why that is. In particular, I'd be
interested to know which property you're looking at on the server where you
saw deptID=100.

John




Reply With Quote
  #3  
Old   
Jay
 
Posts: n/a

Default Re: passing a token from pageA.aspx to pageB.aspx - 10-10-2006 , 04:01 PM



John, you were corect, when I looked in the html source, it had deptID={0}
for each row in the gridView. But I had set the hyperLink's dataTextfield =
deptID which is another column in the gridView. Shouldn't this bring in the
department IDs?
--
Jay


"John Saunders" wrote:

Quote:
"Jay" <gunderj (AT) ommunity (DOT) nospam> wrote in message
news:8A92BEE6-D1E6-441D-BEA6-1FCEA8E53956 (AT) microsoft (DOT) com...
I am trying to get pageA.aspx gridView to pass a key (say deptID) to
pageB.aspx which will use the value passed as a filter in it's own griView
query.
On pageA gridView I have a hyperlinkField with navigateURL property =
~/pageB.aspx?deptID={0} and it is bound to deptID (which is another column
in
the grid). Also, the hyperlinkField it has its dataTextFormatString =
~/pageB.aspx?deptID={0}. PageB datasource has a where clause, where
deptID =
{0}.
At runtime, the hyperlink appears to populate correctly with values such
as
pageB.aspx?deptID=100, etc., byt when I click on it, pageB appears with
the
token still set to deptID={0}.
I am new to webforms, can someone please help? Why doen't the
hyperLinkField pass the deptID value in the url token?

Apparently, you have two different "run" times here. One where the hyperlink
is properly filled in, and one where it goes to the wrong place.

Perhaps you're looking on the server at the hyperlink control when you see
the correct value? Well, the client has an HTML anchor (<a>) element
instead. You should try to find the <a> on the cliekt-side page using View
Source or the IE Developer Toolbar, and see what the href attribute is set
to. I bet it's set to deptID={0}.

Then, all you'll have to do is figure out why that is. In particular, I'd be
interested to know which property you're looking at on the server where you
saw deptID=100.

John




Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.