Click here to Skip to main content
15,913,709 members
Please Sign up or sign in to vote.
3.00/5 (1 vote)
See more:
Hi all.

I have following code in asp.net i am sending two parameters through querystring but it is not working. When i pass one parameter then it works.
Protected Sub gridProject_ItemDataBound(sender As Object, e As System.Web.UI.WebControls.DataGridItemEventArgs) Handles gridProject.ItemDataBound
        Dim s As Integer
        Dim t As String
        If e.Item.ItemType = ListItemType.Item Or e.Item.ItemType = ListItemType.EditItem Or e.Item.ItemType = ListItemType.SelectedItem Or e.Item.ItemType = ListItemType.AlternatingItem Then
            s = CType(e.Item.FindControl("lblpid"), Label).Text
            t = CType(e.Item.FindControl("lblpname"), Label).Text
        End If

        e.Item.Attributes.Add("ondblclick", "javascript:window.location=('ProjectDetails.aspx?pid=" & s & "&pname=" & t & "');")
    End Sub

Please help me.
Thanks in advance.
Posted
Updated 1-Aug-11 20:18pm
v3

1 solution

Try using + signs instead of & e.g. ('ProjectDetails.aspx?pid=" + s + "&pname=" + t + "');")
 
Share this answer
 
Comments
Sachin__Sharma 2-Aug-11 2:21am    
It did not generate error but my datagrid is not showing any record.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900