Hi,
I have used datagrid to display details. I want to use to link button columns in a grid wherein both the link button column has a different navigation url . For one column i can write in the selected index changed but how can i write the url for second button.I am using c# and asp.net. Please help me with this problem

Supplier:
<asp:LinkButton ID="lnkSupplier" Text='<%#Bind("column_Name") %>' runat="server" CommandName="SupplierLink" CommandArgument='<%#Bind("Column_Name") %>'></asp:LinkButton></br>

Category
<asp:LinkButton ID="lnkCategory" Text='<%#Bind("column_Name") %>' runat="server" CommandName="CategoryLink" CommandArgument='<%#Bind("Column_Name") %>'></asp:LinkButton>

Now check which link button is clicked by

protected void DataList1_ItemCommand(object source, DataListCommandEventArgs e)
    {
       
        if (e.CommandName == "SupplierLink")// Supplier Link button clicked

	......   //can get the url/data  from e.CommandArgument
        else
         ......
    }

GOOD LUCK
ravichandra

Hi,
Thanks i ll try this..

Hi,

I got the solution .

thanks.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.