Solved

need to get URL parameter in a template column of a Gridview

Posted on 2007-03-19
4
327 Views
Last Modified: 2012-06-27
I want to append the URL parameter in the following gridview:

            <ItemTemplate>
                <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl='<%# "Update.aspx?RequestId="+DataBinder.Eval(Container.DataItem,"RequestId")+"&m=" %>'
                    Text='<%# Bind("RequestId") %>'></asp:HyperLink>
            </ItemTemplate>

basically, I was the value of "m" to be the value of the URL parameter, call it "m" too.

please help.
0
Comment
Question by:IUAATech
4 Comments
 
LVL 37

Expert Comment

by:samtran0331
ID: 18750468
have you tried adding the request.querystring in there?

<asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl='<%# "Update.aspx?RequestId="+DataBinder.Eval(Container.DataItem,"RequestId")+"&m="+Request.Querystring("m") %>'
                    Text='<%# Bind("RequestId") %>'></asp:HyperLink>
0
 
LVL 14

Accepted Solution

by:
dfu23 earned 250 total points
ID: 18750484
Request.QueryString

<ItemTemplate>
  <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl='<%# "Update.aspx?RequestId="+DataBinder.Eval(Container.DataItem,"RequestId")+"&m="+Request.QueryString["m"] %>'Text='<%# Bind("RequestId") %>'></asp:HyperLink>
</ItemTemplate>
0
 
LVL 11

Expert Comment

by:DotNetThinker
ID: 18750503
NavigateUrl='<%# "Update.aspx?RequestId=" + DataBinder.Eval(Container.DataItem, "RequestId") + "&m=" + DataBinder.Eval(Container.DataItem, "m") %>'
0
 

Author Comment

by:IUAATech
ID: 18750529
didn't realize it was that easy :-)

Thanks.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Sometimes in DotNetNuke module development you want to swap controls within the same module definition.  In doing this DNN (somewhat annoyingly) swaps the Skin and Container definitions to the default admin selections.  To get around this you need t…
User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now