Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

.NET Forum


You are currently viewing our .NET Forum as a guest. Please register to participate.
Login



Reply
passing 2 values in HyperLinkColumn asp.net
Old 06-19-2008, 12:47 AM passing 2 values in HyperLinkColumn asp.net
Nazi370's Avatar
Skilled Talker

Posts: 70
Name: Nazirul
Trades: 0
this page search and display result in datagrid.. there are 2 hyperlink section,... but in one of the hyperlink i must pass 2 value... mainly NoRujukan and NoIC ...

Code:
   Private Sub FillGrid()
        
        Dim oConn As SqlConnection
        oConn = New SqlConnection(System.Configuration.ConfigurationManager.AppSettings("SMPBDB"))
        Filtering()
        Dim sqldataAdapter1 As SqlDataAdapter = New SqlDataAdapter(Session("mySelectQuery"), System.Configuration.ConfigurationManager.AppSettings("SMPBDB"))

        Dim dsSchedule As DataSet = New DataSet

        sqldataAdapter1.Fill(dsSchedule)

        dgUser.DataSource = dsSchedule

        dgUser.DataBind()

        oConn.Close()

    End Sub

=================
id=datagrid
=================

            <asp:datagrid id="dgUser" style="Z-INDEX: 116; LEFT: 200px; POSITION: absolute; TOP: 376px" runat="server"
                Width="717px" Font-Size="Small" ForeColor="Black" Font-Names="Trebuchet MS" BorderColor="Silver"
                BackColor="White" BorderStyle="Solid" CellSpacing="1" CellPadding="1" Height="2cm" PageSize="30"
                HorizontalAlign="Left" OnPageIndexChanged="dgUser_PageIndexChanged" AutoGenerateColumns="False"
                AllowPaging="True" AllowSorting="True">
                <FooterStyle Height="0.5cm" ForeColor="Navy" BackColor="Khaki"></FooterStyle>
                <HeaderStyle Font-Size="X-Small" Font-Names="Trebuchet MS" Font-Bold="True" HorizontalAlign="Center"
                    Height="1cm" ForeColor="Lavender" BackColor="DimGray"></HeaderStyle>
                <PagerStyle Height="0.5cm" Font-Size="X-Small" HorizontalAlign="Center" ForeColor="Navy" BackColor="Lavender"
                    PageButtonCount="15" Mode="NumericPages"></PagerStyle>
                <SelectedItemStyle Height="0.5cm" ForeColor="#66FFFF" BackColor="#66FFFF"></SelectedItemStyle>
                <EditItemStyle Width="0.5cm" BackColor="White"></EditItemStyle>
                <AlternatingItemStyle Font-Size="X-Small" Font-Names="Trebuchet MS" HorizontalAlign="Left" Height="0.5cm"
                    BackColor="Silver"></AlternatingItemStyle>
                <ItemStyle Font-Size="X-Small" Font-Names="Trebuchet MS" Height="0.5cm" BackColor="WhiteSmoke"></ItemStyle>
                <Columns>
                    <asp:HyperLinkColumn DataNavigateUrlField="ID" DataNavigateUrlFormatString="http:/SMPB/LaporanKursus.aspx?UserID={0}"
                        DataTextField="NoRujukan" HeaderText="No Rujukan"></asp:HyperLinkColumn>
                    <asp:BoundColumn DataField="NamaKursus" HeaderText="Nama Kursus"></asp:BoundColumn>
                    <asp:BoundColumn DataField="JenisKursus" HeaderText="Jenis Kursus"></asp:BoundColumn>
                    <asp:HyperLinkColumn Text="Senarai Peserta" DataNavigateUrlField="ID" DataNavigateUrlFormatString="http:/SMPB/LaporanSenaraiPeserta.aspx?UserID={0}"
                        HeaderText="Senarai Peserta"></asp:HyperLinkColumn>
                </Columns>
            </asp:datagrid>
how if i want to pass 2 values, that is 'ID' and 'NoRujukan'

i have try this but no luck
<asp:HyperLinkField DataNavigateUrlFields="ID,NoRujukan" DataNavigateUrlFormatString="LaporanSenaraiPeserta .aspx?UserID={0}&ReferenceNo={1}" DataTextField="UserID" DataTextFormatString="g {0}" HeaderText="Go" />

...
what wrong with the code? ... thanks .. help

2.

Last edited by Nazi370; 06-19-2008 at 02:27 AM.. Reason: fill grid?
Nazi370 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Reply     « Reply to passing 2 values in HyperLinkColumn asp.net
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.10668 seconds with 12 queries