Click here to Skip to main content
15,887,683 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: IIS 6.0 3rd party app question Pin
Mark J. Miller28-Apr-08 6:01
Mark J. Miller28-Apr-08 6:01 
GeneralRe: IIS 6.0 3rd party app question Pin
Mark J. Miller28-Apr-08 6:06
Mark J. Miller28-Apr-08 6:06 
GeneralRe: IIS 6.0 3rd party app question Pin
SomeGuyThatIsMe28-Apr-08 7:19
SomeGuyThatIsMe28-Apr-08 7:19 
GeneralRe: IIS 6.0 3rd party app question Pin
Mark J. Miller28-Apr-08 7:29
Mark J. Miller28-Apr-08 7:29 
GeneralRe: IIS 6.0 3rd party app question Pin
SomeGuyThatIsMe28-Apr-08 7:46
SomeGuyThatIsMe28-Apr-08 7:46 
GeneralRe: IIS 6.0 3rd party app question Pin
SomeGuyThatIsMe29-Apr-08 3:45
SomeGuyThatIsMe29-Apr-08 3:45 
GeneralRe: IIS 6.0 3rd party app question Pin
SomeGuyThatIsMe29-Apr-08 6:32
SomeGuyThatIsMe29-Apr-08 6:32 
Generaladd linkbutton oncommand and comandargument from codebehing Pin
justintimberlake28-Apr-08 2:47
justintimberlake28-Apr-08 2:47 
I have a gridview inside which I have added a linkbutton the gridview will be binded from codebehind from two different tables(one at a time i.e if search parameter is category it will be binded from categorytable and if search parametre is item it will be binded from item table). Now what I want to do is to add OnCommand="mycommand" from codebeinh and CommandArgument from codebehind to the event oncommand. How can I do this. Please help me.Any help will be highly appreciated


<table>
<tr>
<td>
<asp:GridView ID="gridviewsearchresult" runat="server" OnRowDataBound="gridviewsearchresult_RowDataBound">
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:LinkButton ID="linbutton" runat="server" ></asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</td>
</tr>
<tr>
<td>
<asp:LinkButton ID="LinkButton1" runat="server">LinkButton</asp:LinkButton></td>
</tr>
</table>

Codebehind:
protected void gridviewsearchresult_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
//Am I correct cant work here
LinkButton lnk1 = (LinkButton)e.Row.FindControl("linbutton");
lnk1.Click +=new System.Web.UI.WebControls.CommandEventHandler(OnLinkClick);


}
}
GeneralRe: add linkbutton oncommand and comandargument from codebehing Pin
Ashish Sehajpal28-Apr-08 6:30
Ashish Sehajpal28-Apr-08 6:30 
GeneralRe: add linkbutton oncommand and comandargument from codebehing Pin
justintimberlake28-Apr-08 15:51
justintimberlake28-Apr-08 15:51 
GeneralRe: add linkbutton oncommand and comandargument from codebehing Pin
justintimberlake28-Apr-08 16:09
justintimberlake28-Apr-08 16:09 
Generalcms contents Pin
krishnaveer28-Apr-08 2:28
krishnaveer28-Apr-08 2:28 
GeneralRe: cms contents Pin
_AK_28-Apr-08 2:32
_AK_28-Apr-08 2:32 
GeneralRe: cms contents Pin
krishnaveer28-Apr-08 2:44
krishnaveer28-Apr-08 2:44 
GeneralRe: cms contents Pin
_AK_28-Apr-08 3:52
_AK_28-Apr-08 3:52 
GeneralRe: cms contents Pin
krishnaveer28-Apr-08 19:12
krishnaveer28-Apr-08 19:12 
GeneralRe: cms contents Pin
_AK_28-Apr-08 19:25
_AK_28-Apr-08 19:25 
GeneralValidators and other controls Pin
greekius28-Apr-08 2:27
greekius28-Apr-08 2:27 
GeneralRe: Validators and other controls Pin
_AK_28-Apr-08 2:33
_AK_28-Apr-08 2:33 
GeneralRe: Validators and other controls Pin
greekius28-Apr-08 3:48
greekius28-Apr-08 3:48 
GeneralRe: Validators and other controls Pin
_AK_28-Apr-08 3:52
_AK_28-Apr-08 3:52 
Questionhow to delete row from gridview Pin
Ankit At Codeproject28-Apr-08 1:56
Ankit At Codeproject28-Apr-08 1:56 
GeneralRe: how to delete row from gridview Pin
Vasudevan Deepak Kumar28-Apr-08 2:08
Vasudevan Deepak Kumar28-Apr-08 2:08 
QuestionRe: how to delete row from gridview Pin
Ankit At Codeproject28-Apr-08 2:21
Ankit At Codeproject28-Apr-08 2:21 
GeneralMessage box using java script Pin
jeffrey kalampukattussery28-Apr-08 1:55
jeffrey kalampukattussery28-Apr-08 1:55 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.