Solved

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

Posted on 2007-03-19
4
332 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
One of the pain points with developing AJAX, JavaScript, JQuery, and other client-side behaviors is that JavaScript doesn’t allow for cross domain request for pulling content. For example, JavaScript code on www.johnchapman.name could not pull conte…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…
Suggested Courses

737 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