Results 1 to 2 of 2

Thread: I need to pass a row from my datalist to a querystring

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Nov 2005
    Posts
    259

    I need to pass a row from my datalist to a querystring

    I have a datalist that basicaly lists Store#, City, State and Zip. I want to have a pop up window added to the list so the user can click the link and a window will open up with a map and other information.

    I added a hyperlink but now I don't know how to get the store# into the query string. Here is what I have so far. The DataItem with the store# is just Container.DataItem("Store"). Any ideas? Is there a better way?

    VB Code:
    1. <ItemTemplate>
    2.                 <%#Container.DataItem("City")%><br />
    3.                 <%#Container.DataItem("Street") %><br />
    4.                 <%#Container.DataItem("Zip")%><br />
    5.                 <%#Container.DataItem("Phone")%><br />
    6.                 <!--
    7.                 <asp:HyperLink
    8.                     Text="View Map"
    9.                     ID="HyperLink1" runat="server"
    10.                     NavigateUrl="javascript:var w =window.open('answer.aspx?Store={0)',null,'width=400,height=200,location=no')">
    11.                 </asp:HyperLink><br /><br />
    12.                 -->
    13.                 </ItemTemplate>

  2. #2

    Thread Starter
    Hyperactive Member
    Join Date
    Nov 2005
    Posts
    259

    Re: I need to pass a row from my datalist to a querystring

    Never mind I figured it out. All I needed to do was use a simple href with the javascript as the link.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width