Click here to Skip to main content
       

ASP.NET

 
QuestionSQL Server error PinmemberPritam Sankar Roy18-Jan-13 18:31 
AnswerRe: SQL Server error PinmemberNandakishorerao18-Jan-13 21:39 
AnswerRe: SQL Server error PinmemberShameel23-Jan-13 4:51 
QuestionHow to asp:Literal with more..? PinmemberJassim Rahma18-Jan-13 3:19 
AnswerRe: How to asp:Literal with more..? PinmemberParwej Ahamad18-Jan-13 7:13 
AnswerRe: How to asp:Literal with more..? PinmemberNandakishorerao18-Jan-13 21:46 
QuestionFindControl not working in Gridview ItemTemplate of Button PinmemberMember 974870717-Jan-13 19:42 
AnswerRe: FindControl not working in Gridview ItemTemplate of Button Pingroupchester_it2118-Jan-13 6:16 
<ItemTemplate>
 <asp:CheckBox ID="chkItemSelect" runat="server" />
 <asp:Label ID="lblname" Text='<%#Bind("name")%>' runat="server" />              
<asp:Button ID="btnFindx" runat="server" CommandName="Findx" Text="Do Some thing" CommandArgument='<%#Eval("ID")%>'></asp:Button>
                                        </ItemTemplate>
 
So, in event OnRowCommand(Code Behind) :
 
Protected Sub GridView_RowCommand(sender As [Object], e As GridViewCommandEventArgs)
	Select Case e.CommandName
		Case "Findx"
			MethodFindControlValue()
			Exit Select
	End Select
End Sub
 
..in MethodFindControlValue() :
Private Sub MethodFindControlValue()
	For Each row As GridViewRow In ApprovalGrid.Rows
		Dim chkItemSelect As CheckBox = CType(row.FindControl("chkItemSelect"), CheckBox)
		Dim chkItemSelect As Label = CType(row.FindControl("lblname"), CheckBox)
 
		Dim id As String = Convert.ToString(NameGridView.DataKeys(row.RowIndex).Value.ToString())
	Next
End Sub
 
 

hope this help you............Big Grin | :-D
QuestionRe: FindControl not working in Gridview ItemTemplate of Button PinmemberNandakishorerao18-Jan-13 21:48 
AnswerRe: FindControl not working in Gridview ItemTemplate of Button PinmemberKanwal Daud Gill21-Jan-13 20:23 
GeneralRe: FindControl not working in Gridview ItemTemplate of Button PinmemberNandakishorerao21-Jan-13 20:49 
QuestionTracking Emails PinmemberJaison Joe17-Jan-13 17:49 
Questionhow to redirect in a url? PinmemberJassim Rahma17-Jan-13 9:42 
AnswerRe: how to redirect in a url? PinmemberParwej Ahamad18-Jan-13 7:17 
GeneralRe: how to redirect in a url? PinmemberJassim Rahma18-Jan-13 7:36 
GeneralRe: how to redirect in a url? PinmemberParwej Ahamad18-Jan-13 17:23 
AnswerRe: how to redirect in a url? PinmemberRekhash18-Jan-13 23:01 
QuestionHow to add KML file to google Map using javascript in asp.net PinmemberTrivikramarao Vurubandi17-Jan-13 0:40 
QuestionExport data in Excel(xlsx) without using Excel Object from Datatable. Pinmembermca_rameshkumar16-Jan-13 22:00 
AnswerRe: Export data in Excel(xlsx) without using Excel Object from Datatable. Pingroupchester_it2118-Jan-13 6:52 
QuestionButton or ImageButton? PinmemberJassim Rahma16-Jan-13 9:40 
AnswerRe: Button or ImageButton? Pinmemberjkirkerx16-Jan-13 12:40 
QuestionGoogle Translate vb.net PinmemberDotNetFellow15-Jan-13 22:31 
AnswerRe: Google Translate vb.net PinmvpSandeep Mewara16-Jan-13 2:57 
Questionunzipping file in host ? Pinmemberjojoba201115-Jan-13 17:59 

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

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


Advertise | Privacy | Mobile
Web04 | 2.8.140916.1 | Last Updated 18 Sep 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid