Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I have been working on an aspx page in local mode and it works fine on my p.c. but when I copy the pages out to the web server, I get an error. The code counts the number of items selected in a checkboxlist and writes the number as an integer to a textbox.

Here is the error I get:

"BC30456: 'SystemApp_OnSelectedIndexChanged' is not a member of 'ASP.p_supp_aspx'"

 

Here is the code associated with the checkbox list:

(From the aspx page - there are 4 checkboxes associated with this list)

<asp:checkboxlist id="SystemApp" Runat="server" AutoPostBack="True" RepeatColumns="4" RepeatDirection="Horizontal" OnSelectedIndexChanged="SystemApp_OnSelectedIndexChanged">

 

(From the code behind page)

Sub SystemApp_OnSelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles _

SystemApp.SelectedIndexChanged

Dim itmApp As ListItem

ViewState("TotApp") = 0

For Each itmApp In SystemApp.Items

If itmApp.Selected = True Then

ViewState("TotApp") += 1

End If

Next

TotSysApp.Text = ViewState("TotApp") + ViewState("TotOthApp")

End Sub

Posted
If you are calling it from your front end page, then you need to mark the sub as Public, but since you are handling this event in your codebehind, then no need to put it in your front end page.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...