Click here to Skip to main content
15,892,643 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: I want to show all the Logical drives Pin
Sandeep Akhare10-Nov-06 4:26
Sandeep Akhare10-Nov-06 4:26 
AnswerRe: I want to show all the Logical drives Pin
indianet10-Nov-06 7:46
indianet10-Nov-06 7:46 
QuestionUser Control's Button Click event is not firing Pin
sri_con310-Nov-06 1:25
sri_con310-Nov-06 1:25 
AnswerRe: User Control's Button Click event is not firing Pin
ednrgc10-Nov-06 8:50
ednrgc10-Nov-06 8:50 
GeneralRe: User Control's Button Click event is not firing Pin
sri_con311-Nov-06 1:57
sri_con311-Nov-06 1:57 
GeneralRe: User Control's Button Click event is not firing Pin
ednrgc13-Nov-06 3:00
ednrgc13-Nov-06 3:00 
QuestionDatagrid Problem Pin
monika_vasvani10-Nov-06 0:24
monika_vasvani10-Nov-06 0:24 
AnswerRe: Datagrid Problem Pin
Suresh Pirsquare10-Nov-06 1:09
Suresh Pirsquare10-Nov-06 1:09 
I think you have to add a server control to your datagrid.

<td><asp:Datagrid CommandName="ID"
Text=<%# DataBinder.Eval(Container.DataItem, "au_id") %>
runat=server/></td>

The above line will add a Button control within the Datagrid control. The CommandName property is used to uniquely identify the button; if there is more than one Button control, each control must have a different CommandName.

Next, we need to modify the <asp:Datagrid> element so that it knows which event to fire when the Button control is clicked. We need to specify the OnItemCommand property, indicating the event to service when the button is clicked:


<asp:Datagrid id="Datagrid1"
OnItemCommand="Button_ItemCommand" runat="server">

Lastly, code the routine for the Button_ItemCommand event:


Sub Button_ItemCommand(ByVal Sender As Object, _
ByVal e As DatagridCommandEventArgs)
If e.CommandName = "ID" Then
Response.Write("ID selected is " & _
CType(e.CommandSource, Button).Text())
End If
End Sub

Hope this may help u


Regards,

Suresh Dayma




Everything Is Possible!
GeneralRe: Datagrid Problem Pin
monika_vasvani10-Nov-06 1:31
monika_vasvani10-Nov-06 1:31 
AnswerRe: Datagrid Problem Pin
postmaster@programmingknowledge.com10-Nov-06 2:17
postmaster@programmingknowledge.com10-Nov-06 2:17 
QuestionHow to count records from database.. Pin
Sam.M9-Nov-06 23:58
Sam.M9-Nov-06 23:58 
AnswerRe: How to count records from database.. Pin
_mubashir10-Nov-06 0:05
_mubashir10-Nov-06 0:05 
GeneralRe: How to count records from database.. Pin
Sam.M10-Nov-06 0:08
Sam.M10-Nov-06 0:08 
GeneralRe: How to count records from database.. Pin
_mubashir10-Nov-06 0:13
_mubashir10-Nov-06 0:13 
AnswerRe: How to count records from database.. Pin
Suresh Pirsquare10-Nov-06 0:24
Suresh Pirsquare10-Nov-06 0:24 
AnswerRe: How to count records from database.. Pin
Britney S. Morales10-Nov-06 1:57
Britney S. Morales10-Nov-06 1:57 
AnswerRe: How to count records from database.. Pin
Michael P Butler10-Nov-06 2:14
Michael P Butler10-Nov-06 2:14 
AnswerRe: How to count records from database.. Pin
postmaster@programmingknowledge.com10-Nov-06 2:19
postmaster@programmingknowledge.com10-Nov-06 2:19 
Question"string to int" Pin
ravikiranreddydharmannagari9-Nov-06 23:36
ravikiranreddydharmannagari9-Nov-06 23:36 
AnswerRe: "string to int" Pin
_mubashir10-Nov-06 0:06
_mubashir10-Nov-06 0:06 
GeneralRe: "string to int" Pin
_AK_10-Nov-06 0:08
_AK_10-Nov-06 0:08 
AnswerRe: "string to int" Pin
_AK_10-Nov-06 0:06
_AK_10-Nov-06 0:06 
AnswerRe: "string to int" Pin
Suresh Pirsquare10-Nov-06 0:10
Suresh Pirsquare10-Nov-06 0:10 
QuestionTrace Back Button in IE Pin
Deepak the Cool9-Nov-06 23:35
Deepak the Cool9-Nov-06 23:35 
AnswerRe: Trace Back Button in IE Pin
PavanPareta9-Nov-06 23:51
PavanPareta9-Nov-06 23:51 

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.