Click here to Skip to main content
15,795,581 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: IIS 6.0 3rd party app question Pin
Mark J. Miller28-Apr-08 7:01
Mark J. Miller28-Apr-08 7:01 
GeneralRe: IIS 6.0 3rd party app question Pin
Mark J. Miller28-Apr-08 7:06
Mark J. Miller28-Apr-08 7:06 
GeneralRe: IIS 6.0 3rd party app question Pin
SomeGuyThatIsMe28-Apr-08 8:19
SomeGuyThatIsMe28-Apr-08 8:19 
GeneralRe: IIS 6.0 3rd party app question Pin
Mark J. Miller28-Apr-08 8:29
Mark J. Miller28-Apr-08 8:29 
GeneralRe: IIS 6.0 3rd party app question Pin
SomeGuyThatIsMe28-Apr-08 8:46
SomeGuyThatIsMe28-Apr-08 8:46 
GeneralRe: IIS 6.0 3rd party app question Pin
SomeGuyThatIsMe29-Apr-08 4:45
SomeGuyThatIsMe29-Apr-08 4:45 
GeneralRe: IIS 6.0 3rd party app question Pin
SomeGuyThatIsMe29-Apr-08 7:32
SomeGuyThatIsMe29-Apr-08 7:32 
Generaladd linkbutton oncommand and comandargument from codebehing Pin
justintimberlake28-Apr-08 3:47
justintimberlake28-Apr-08 3: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 7:30
Ashish Sehajpal28-Apr-08 7:30 
GeneralRe: add linkbutton oncommand and comandargument from codebehing Pin
justintimberlake28-Apr-08 16:51
justintimberlake28-Apr-08 16:51 
GeneralRe: add linkbutton oncommand and comandargument from codebehing Pin
justintimberlake28-Apr-08 17:09
justintimberlake28-Apr-08 17:09 
Generalcms contents Pin
krishnaveer28-Apr-08 3:28
krishnaveer28-Apr-08 3:28 
GeneralRe: cms contents Pin
_AK_28-Apr-08 3:32
_AK_28-Apr-08 3:32 
GeneralRe: cms contents Pin
krishnaveer28-Apr-08 3:44
krishnaveer28-Apr-08 3:44 
GeneralRe: cms contents Pin
_AK_28-Apr-08 4:52
_AK_28-Apr-08 4:52 
GeneralRe: cms contents Pin
krishnaveer28-Apr-08 20:12
krishnaveer28-Apr-08 20:12 
GeneralRe: cms contents Pin
_AK_28-Apr-08 20:25
_AK_28-Apr-08 20:25 
GeneralValidators and other controls Pin
greekius28-Apr-08 3:27
greekius28-Apr-08 3:27 
GeneralRe: Validators and other controls Pin
_AK_28-Apr-08 3:33
_AK_28-Apr-08 3:33 
GeneralRe: Validators and other controls Pin
greekius28-Apr-08 4:48
greekius28-Apr-08 4:48 
GeneralRe: Validators and other controls Pin
_AK_28-Apr-08 4:52
_AK_28-Apr-08 4:52 
Questionhow to delete row from gridview Pin
Ankit At Codeproject28-Apr-08 2:56
Ankit At Codeproject28-Apr-08 2:56 
GeneralRe: how to delete row from gridview Pin
Vasudevan Deepak Kumar28-Apr-08 3:08
Vasudevan Deepak Kumar28-Apr-08 3:08 
QuestionRe: how to delete row from gridview Pin
Ankit At Codeproject28-Apr-08 3:21
Ankit At Codeproject28-Apr-08 3:21 
GeneralMessage box using java script Pin
jeffrey kalampukattussery28-Apr-08 2:55
jeffrey kalampukattussery28-Apr-08 2: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.