Click here to Skip to main content
15,894,343 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Gridview + asp.net 2.0 + c# Pin
ritu432114-Feb-07 20:01
ritu432114-Feb-07 20:01 
GeneralRe: Gridview + asp.net 2.0 + c# Pin
varshavmane14-Feb-07 20:20
varshavmane14-Feb-07 20:20 
GeneralRe: Gridview + asp.net 2.0 + c# Pin
ritu432114-Feb-07 21:53
ritu432114-Feb-07 21:53 
GeneralRe: Gridview + asp.net 2.0 + c# Pin
varshavmane14-Feb-07 22:10
varshavmane14-Feb-07 22:10 
GeneralRe: Gridview + asp.net 2.0 + c# Pin
Imran Khan Pathan14-Feb-07 22:18
Imran Khan Pathan14-Feb-07 22:18 
GeneralRe: Gridview + asp.net 2.0 + c# Pin
ritu432114-Feb-07 22:36
ritu432114-Feb-07 22:36 
GeneralRe: Gridview + asp.net 2.0 + c# Pin
varshavmane14-Feb-07 22:38
varshavmane14-Feb-07 22:38 
GeneralRe: Gridview + asp.net 2.0 + c# Pin
Imran Khan Pathan14-Feb-07 23:06
Imran Khan Pathan14-Feb-07 23:06 
Hi ritu

u can take server bottun between <ItemTemplate> tag.
i give u whole code how to take a button

now try this code

<asp:GridView ID="GV_cart" runat="server" AutoGenerateColumns="False"
OnRowCommand="GV_cart_RowCommand" CellPadding="4" ForeColor="#333333">
<Columns>
<asp:BoundField DataField="fileid" HeaderText="File Id" />
<asp:BoundField DataField="Filename" HeaderText="File Name" />
<asp:TemplateField>
<HeaderTemplate>File id</HeaderTemplate>
<ItemTemplate>
<asp:Button ID="BT" runat="server" CommandName="button" CommandArgument='<%#Eval("fileid") %>' Text="Button" Width="75px" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>


After this write code on Row_command event
if (e.CommandName == "button")
{
string fileid= e.CommandArgument.ToString();
}


if u use more than one button than this code may be useful for checking which button evet fires by commandname condition.

Pathan
GeneralRe: Gridview + asp.net 2.0 + c# Pin
ritu432114-Feb-07 23:17
ritu432114-Feb-07 23:17 
GeneralRe: Gridview + asp.net 2.0 + c# Pin
Imran Khan Pathan15-Feb-07 0:16
Imran Khan Pathan15-Feb-07 0:16 
QuestionHow to call web reference without adding webreference in asp.net 2.0 Pin
nikhil123414-Feb-07 19:53
nikhil123414-Feb-07 19:53 
AnswerRe: How to call web reference without adding webreference in asp.net 2.0 Pin
Michael Sync14-Feb-07 20:14
Michael Sync14-Feb-07 20:14 
Questionxls date time format Pin
yogesh m14-Feb-07 19:23
yogesh m14-Feb-07 19:23 
QuestionWeb set up problem Pin
mohd imran abdul aziz14-Feb-07 19:17
mohd imran abdul aziz14-Feb-07 19:17 
QuestionXML using XSL Pin
fmlove14-Feb-07 19:09
fmlove14-Feb-07 19:09 
AnswerRe: XML using XSL Pin
Walter_H15-Feb-07 1:43
Walter_H15-Feb-07 1:43 
Questionwebhost -- your opinion Pin
the pink jedi14-Feb-07 17:27
the pink jedi14-Feb-07 17:27 
AnswerRe: webhost -- your opinion Pin
Neeraj Arora14-Feb-07 18:14
Neeraj Arora14-Feb-07 18:14 
AnswerRe: webhost -- your opinion [modified] Pin
Michael Sync14-Feb-07 20:02
Michael Sync14-Feb-07 20:02 
Questionsession expires after file update... Pin
PandemoniumPasha14-Feb-07 17:16
PandemoniumPasha14-Feb-07 17:16 
AnswerRe: session expires after file update... Pin
Neeraj Arora14-Feb-07 18:17
Neeraj Arora14-Feb-07 18:17 
GeneralRe: session expires after file update... Pin
PandemoniumPasha14-Feb-07 20:34
PandemoniumPasha14-Feb-07 20:34 
QuestionQuestion about HeaderStyle in GridView Pin
xiao bin bin14-Feb-07 11:43
xiao bin bin14-Feb-07 11:43 
AnswerRe: Question about HeaderStyle in GridView Pin
Shajeel14-Feb-07 19:03
Shajeel14-Feb-07 19:03 
GeneralRe: Question about HeaderStyle in GridView Pin
xiao bin bin14-Feb-07 19:44
xiao bin bin14-Feb-07 19:44 

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.