Click here to Skip to main content
15,905,004 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: .Net Framework 3.0 and ASP.net..! Pin
Christian Graus30-May-07 22:14
protectorChristian Graus30-May-07 22:14 
AnswerRe: .Net Framework 3.0 and ASP.net..! Pin
szukuro30-May-07 22:35
szukuro30-May-07 22:35 
QuestionCan we add Click Event for a Label Control? Pin
Venkatesh Mookkan30-May-07 21:31
Venkatesh Mookkan30-May-07 21:31 
AnswerRe: Can we add Click Event for a Label Control? Pin
szukuro30-May-07 22:29
szukuro30-May-07 22:29 
GeneralRe: Can we add Click Event for a Label Control? Pin
Venkatesh Mookkan30-May-07 22:42
Venkatesh Mookkan30-May-07 22:42 
GeneralRe: Can we add Click Event for a Label Control? Pin
szukuro30-May-07 23:10
szukuro30-May-07 23:10 
GeneralRe: Can we add Click Event for a Label Control? Pin
Venkatesh Mookkan30-May-07 23:31
Venkatesh Mookkan30-May-07 23:31 
GeneralRe: Can we add Click Event for a Label Control? Pin
szukuro31-May-07 0:06
szukuro31-May-07 0:06 
Venkatesh MookkanPublic Sub New()
Attributes.Add("onclick", Page.ClientScript.GetPostBackEventReference(Me, ClientID))
End Sub
End Class


That's the problem rigt here. Like I said, you try to attach the method too early. In the constructor the control has not been added to a page yet, thus the Page property is Nothing at this time. Later on in the control life cycle the controls will get added to a page, and the Page property will now contain a reference to this page.

So to make it work, insteas of Public Sub New() write Protected Overrides Sub OnPreRender(ByVal e As System.EventArgs)
GeneralRe: Can we add Click Event for a Label Control? Pin
Venkatesh Mookkan31-May-07 0:12
Venkatesh Mookkan31-May-07 0:12 
GeneralRe: Can we add Click Event for a Label Control? Pin
Sandeep Akhare31-May-07 1:14
Sandeep Akhare31-May-07 1:14 
GeneralRe: Can we add Click Event for a Label Control? Pin
Venkatesh Mookkan31-May-07 2:14
Venkatesh Mookkan31-May-07 2:14 
GeneralRe: Can we add Click Event for a Label Control? Pin
Sandeep Akhare31-May-07 2:30
Sandeep Akhare31-May-07 2:30 
GeneralRe: Can we add Click Event for a Label Control? Pin
Venkatesh Mookkan31-May-07 5:57
Venkatesh Mookkan31-May-07 5:57 
Questionhow to get the particular column data in a datagrid when i check the checkbox in one of the columns of the grid Pin
M.Ramesh30-May-07 21:29
M.Ramesh30-May-07 21:29 
AnswerRe: how to get the particular column data in a datagrid when i check the checkbox in one of the columns of the grid Pin
Venkatesh Mookkan30-May-07 21:36
Venkatesh Mookkan30-May-07 21:36 
GeneralRe: how to get the particular column data in a datagrid when i check the checkbox in one of the columns of the grid Pin
M.Ramesh30-May-07 21:51
M.Ramesh30-May-07 21:51 
GeneralRe: how to get the particular column data in a datagrid when i check the checkbox in one of the columns of the grid Pin
Venkatesh Mookkan30-May-07 21:55
Venkatesh Mookkan30-May-07 21:55 
Questioncan we bind data for datagrid in javascript Pin
M.Ramesh30-May-07 21:19
M.Ramesh30-May-07 21:19 
AnswerRe: can we bind data for datagrid in javascript Pin
Venkatesh Mookkan30-May-07 21:43
Venkatesh Mookkan30-May-07 21:43 
GeneralRe: can we bind data for datagrid in javascript Pin
RichardGrimmer31-May-07 4:56
RichardGrimmer31-May-07 4:56 
GeneralRe: can we bind data for datagrid in javascript Pin
Venkatesh Mookkan31-May-07 5:52
Venkatesh Mookkan31-May-07 5:52 
GeneralRe: can we bind data for datagrid in javascript Pin
RichardGrimmer31-May-07 9:24
RichardGrimmer31-May-07 9:24 
GeneralRe: can we bind data for datagrid in javascript Pin
Venkatesh Mookkan31-May-07 14:15
Venkatesh Mookkan31-May-07 14:15 
AnswerRe: can we bind data for datagrid in javascript Pin
Christian Graus30-May-07 22:15
protectorChristian Graus30-May-07 22:15 
Questiongridview's checkboxes stay disabled Pin
Ziltard30-May-07 21:13
Ziltard30-May-07 21:13 

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.