Results 1 to 5 of 5

Thread: is it possible in .NET

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Apr 2003
    Location
    Florida
    Posts
    18

    is it possible in .NET

    Hi Guys, Windows 2000, IIS 5.0 ASP.NET

    I am using DataGrid with HyperLinkColumn, it works O.K,

    Problem is: I need to send to my link page two values, (salesId and productNo) sofar I can send only one. Thanks!!

    - The value of the Clicked cell
    - The value of the First cell at the same row

    Sql Table
    productNo orderNo salesId
    2500 025 MC02

    <asp:HyperlinkColumn runat="server"
    DataNavigateUrlField="productNo"
    DataNavigateUrlFormatString="report4.aspx?id={0}"
    DataTextField="salesId"
    </asp:HyperLinkColumn>
    Thanks

  2. #2
    Frenzied Member DevGrp's Avatar
    Join Date
    Nov 2001
    Location
    Charlotte, NC
    Posts
    1,256
    What do you mean by on one?
    You can do this DataNavigateUrlFormatString="report4.aspx?id={0}&no={1}"

  3. #3
    PowerPoster hellswraith's Avatar
    Join Date
    Jul 2002
    Location
    Washington St.
    Posts
    2,464
    Here is how I do it in my forums:
    Code:
    NavigateUrl='<%# DataBinder.Eval(Container, "DataItem.salesId", "report4.aspx?id={0}") + DataBinder.Eval(Container, "DataItem.productNo", "&amp;prodnum={0}") %>'
    I am just basically adding some more information to the first string. If you are using VB.Net, then you will probably have to change the '+' to an & like so:
    Code:
    NavigateUrl='<%# DataBinder.Eval(Container, "DataItem.salesId", "report4.aspx?id={0}") & DataBinder.Eval(Container, "DataItem.productNo", "&amp;prodnum={0}") %>'
    Works pretty well for me, you can see it at my forums when you click a thread link:
    http://www.variantx.com/VXForums/Posts.aspx?CatID=3

  4. #4

    Thread Starter
    Junior Member
    Join Date
    Apr 2003
    Location
    Florida
    Posts
    18
    Thnak you for your quick response, however I can not make it to work for me.

    Following is the structure I have

    <asp:TemplateColumn HeaderText="Product Number">
    <ItemTemplate>
    NavigateUrl='<%# DataBinder.Eval
    (Container, "DataItem.salesId", "report4.aspx?id={0}") &
    DataBinder.Eval(Container, "DataItem.productNo",
    "&prodnum={0}") %>'
    </ItemTemplate>
    </asp:TemplateColumn>


    Appreciate any further help,
    Thanks

  5. #5
    PowerPoster hellswraith's Avatar
    Join Date
    Jul 2002
    Location
    Washington St.
    Posts
    2,464
    Try this:

    <asp:TemplateColumn HeaderText="Product Number">
    <ItemTemplate>
    <asp:HyperlinkColumn runat="server" NavigateUrl=
    '<%# DataBinder.Eval(Container, "DataItem.salesId", "report4.aspx?id={0}") & DataBinder.Eval(Container, "DataItem.productNo",
    "&prodnum={0}") %>' DataTextField="salesId">
    </asp:HyperLinkColumn>
    </ItemTemplate>
    </asp:TemplateColumn>

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