Professional Web Applications Themes

Multiple elements within a datagrid querystring - ASP.NET General

Hi, I need to bind data to a datagrid and have a custom hyperlink column that has multiple elements in the querystring: Page.aspx?1=Hello&2=Goodbye... The query string needs to be populated from different values in the database. How can I therefore allow for this in the template rather than having to create a custom field in my stored procedure as the following will not work!: NavigateUrl='SelectCriteria.aspx?Database=<%# DataBinder.Eval(Container, "DataItem.lsID") %>&Table=<%# DataBinder.Eval(Container, "DataItem.tblID") %>&QueryID=<%# DataBinder.Eval(Container, "DataItem.QueryID") %>' Many thanks in anticipation, Carl [email]carl.howarthm-s-solutions.co.uk[/email]...

  1. #1

    Default Multiple elements within a datagrid querystring

    Hi,

    I need to bind data to a datagrid and have a custom hyperlink column that
    has multiple elements in the querystring:

    Page.aspx?1=Hello&2=Goodbye...

    The query string needs to be populated from different values in the
    database. How can I therefore allow for this in the template rather than
    having to create a custom field in my stored procedure as the following will
    not work!:

    NavigateUrl='SelectCriteria.aspx?Database=<%# DataBinder.Eval(Container,
    "DataItem.lsID") %>&Table=<%# DataBinder.Eval(Container, "DataItem.tblID")
    %>&QueryID=<%# DataBinder.Eval(Container, "DataItem.QueryID") %>'

    Many thanks in anticipation,

    Carl
    [email]carl.howarthm-s-solutions.co.uk[/email]


    Carl Howarth Guest

  2. #2

    Default Re: Multiple elements within a datagrid querystring

    It is possible try this,
    <asp:DataGrid id="DataGrid1" AutoGenerateColumns="False" style="Z-INDEX:
    101; LEFT: 66px; POSITION: absolute; TOP: 79px" runat="server">

    <Columns>

    <asp:TemplateColumn HeaderText="Order">

    <ItemTemplate>

    <asp:Hyperlink runat="server"
    Text='<%#DataBinder.Eval(Container.DataItem,"Order ID")%>' NavigateUrl='<%#
    "page.aspx?Orderid=" + DataBinder.Eval(Container.DataItem,"Orderid") +
    "&ProductID=" + DataBinder.Eval(Container.DataItem,"ProductID")%>'
    ID="Hyperlink1" NAME="Hyperlink1"/>

    </ItemTemplate>

    </asp:TemplateColumn>

    </Columns>

    </asp:DataGrid>


    --
    Saravana
    Microsoft India Community Star,
    MCAD,SE,SD,DBA.


    "Carl Howarth" <carl.howarthm-s-solutions.co.uk> wrote in message
    news:uKG8NocUDHA.2564tk2msftngp13.phx.gbl...
    > Hi,
    >
    > I need to bind data to a datagrid and have a custom hyperlink column that
    > has multiple elements in the querystring:
    >
    > Page.aspx?1=Hello&2=Goodbye...
    >
    > The query string needs to be populated from different values in the
    > database. How can I therefore allow for this in the template rather than
    > having to create a custom field in my stored procedure as the following
    will
    > not work!:
    >
    > NavigateUrl='SelectCriteria.aspx?Database=<%# DataBinder.Eval(Container,
    > "DataItem.lsID") %>&Table=<%# DataBinder.Eval(Container, "DataItem.tblID")
    > %>&QueryID=<%# DataBinder.Eval(Container, "DataItem.QueryID") %>'
    >
    > Many thanks in anticipation,
    >
    > Carl
    > [email]carl.howarthm-s-solutions.co.uk[/email]
    >
    >

    Saravana Guest

Similar Threads

  1. datagrid multiple selections
    By dave in forum Macromedia Flash Data Integration
    Replies: 0
    Last Post: May 2nd, 04:59 PM
  2. querystring parameter passing problem in a datagrid using hyperlink column
    By berk k via DotNetMonster.com in forum ASP.NET Data Grid Control
    Replies: 0
    Last Post: July 18th, 10:55 AM
  3. HTML::Form, Multiple select Elements with Same name
    By David Marshall in forum PERL Modules
    Replies: 0
    Last Post: July 30th, 09:48 PM
  4. Replies: 2
    Last Post: November 13th, 10:54 PM
  5. Multiple Querystring
    By Deepiceman in forum ASP
    Replies: 1
    Last Post: October 7th, 09:37 PM

Bookmarks

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139