Click here to Skip to main content
15,888,351 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Changing Date Format Pin
Blue_Boy28-Apr-08 0:45
Blue_Boy28-Apr-08 0:45 
GeneralRe: Changing Date Format Pin
munklefish28-Apr-08 0:50
munklefish28-Apr-08 0:50 
GeneralDiv inside another div not sizing correctly in the user control Pin
gottimukkala25-Apr-08 4:14
gottimukkala25-Apr-08 4:14 
GeneralRe: Div inside another div not sizing correctly in the user control Pin
Taurian11025-Apr-08 5:04
Taurian11025-Apr-08 5:04 
GeneralRe: Div inside another div not sizing correctly in the user control Pin
gottimukkala25-Apr-08 5:17
gottimukkala25-Apr-08 5:17 
GeneralRe: Div inside another div not sizing correctly in the user control Pin
Taurian11025-Apr-08 5:19
Taurian11025-Apr-08 5:19 
GeneralRe: Div inside another div not sizing correctly in the user control Pin
gottimukkala25-Apr-08 5:36
gottimukkala25-Apr-08 5:36 
QuestionNeed help with passing value via OnCheckedChanged event [modified] Pin
the_0live25-Apr-08 4:03
the_0live25-Apr-08 4:03 
ok, so i'm messing around seeing what i can do with the different controls (i started doing ASP last monday ^_^) and i think i pretty much have the basics down. problem is, i can't find any way to pass an argument from a checkbox.

Default.aspx:
     <code><asp:CheckBox runat="server" 
                  ID="chkFirst" AutoPostBack="true" 
                  OnCheckedChanged="Check_Controls(chkFirst.ID,lblFirstCheck.ID)" />
    <asp:Label runat="server"
                  ID="lblFirstCheck"
                  Text=""></asp:Label>
</code>

Default.aspx.vb
<code>
    Sub Check_Controls(ByVal sender As Object, ByVal e As String)

        Dim tmpCheck As CheckBox = Page.FindControl(sender)
        Dim tmpLabel As Label = Page.FindControl(e)


        If tmpCheck.Checked = True Then
            tmpLabel.Text = "Checked!"
        Else
            tmpLabel.Text = "Not checked :("
        End If
    End Sub
</code>

|
|
If i call a separate sub and use it declare and pass the label.id and checkbox.id into Check_Controls then it works like a champ.
If i use the code as posted above, it generates the error: "'AddressOf' operand must be the name of a method (without parentheses)" for the line with OnCheckedChanged.

I made buttons that pass in this manner without any trouble using 'commandargument' but checkboxes don't seem to have an equivalent setup.

I've googled and googled and googled but haven't found any way to do this. The only thing close is a brief mention by someone that they used the "cssClass" attribute as a workaround but they didn't expand on exactly 'how' they did it.

Any help would be appreciated. ^_^

modified on Friday, April 25, 2008 12:20 PM

GeneralRe: Need help with passing value via OnCheckedChanged event Pin
AlexeiXX325-Apr-08 14:07
AlexeiXX325-Apr-08 14:07 
GeneralRe: Need help with passing value via OnCheckedChanged event Pin
the_0live28-Apr-08 2:28
the_0live28-Apr-08 2:28 
GeneralRe: Need help with passing value via OnCheckedChanged event Pin
the_0live6-May-08 3:45
the_0live6-May-08 3:45 
QuestionHow to get hardcoded data to xml and that xml can be used in .Net Pin
subbu.sk25-Apr-08 2:39
subbu.sk25-Apr-08 2:39 
AnswerRe: How to get hardcoded data to xml and that xml can be used in .Net Pin
eyeseetee25-Apr-08 2:42
eyeseetee25-Apr-08 2:42 
GeneralProblume With Excel sheet Pin
santoshkomarraju25-Apr-08 2:36
santoshkomarraju25-Apr-08 2:36 
QuestionI have an error :'System.Web.UI.WebControls.GridView.Rows' is a 'property' but is used like a 'method' Pin
Saba0225-Apr-08 2:33
Saba0225-Apr-08 2:33 
QuestionRe: I have an error :'System.Web.UI.WebControls.GridView.Rows' is a 'property' but is used like a 'method' Pin
Vasudevan Deepak Kumar25-Apr-08 2:35
Vasudevan Deepak Kumar25-Apr-08 2:35 
GeneralRe: I have an error :'System.Web.UI.WebControls.GridView.Rows' is a 'property' but is used like a 'method' Pin
eyeseetee25-Apr-08 2:47
eyeseetee25-Apr-08 2:47 
GeneralRe: I have an error :'System.Web.UI.WebControls.GridView.Rows' is a 'property' but is used like a 'method' Pin
AlexeiXX325-Apr-08 5:42
AlexeiXX325-Apr-08 5:42 
GeneralUse One datalist into another Pin
raushan_925-Apr-08 1:42
raushan_925-Apr-08 1:42 
GeneralRe: Use One datalist into another Pin
Vasudevan Deepak Kumar25-Apr-08 2:36
Vasudevan Deepak Kumar25-Apr-08 2:36 
RantRe: Use One datalist into another Pin
Ashish Sehajpal25-Apr-08 4:41
Ashish Sehajpal25-Apr-08 4:41 
GeneralRe: Use One datalist into another Pin
AlexeiXX325-Apr-08 6:35
AlexeiXX325-Apr-08 6:35 
NewsRe: Use One datalist into another Pin
shenbin25-Apr-08 21:52
shenbin25-Apr-08 21:52 
General[Message Deleted] Pin
Krazy Programmer25-Apr-08 0:40
Krazy Programmer25-Apr-08 0:40 
GeneralRe: How to make the complete page to be appeared in Center of the Screen [modified] Pin
Reethika25-Apr-08 0:48
Reethika25-Apr-08 0:48 

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.