J
John Mason
Hi,
I am trying to work out how to make reference to an asp textbox control
within a class, contained in a user control, but receive the following
error...
BC30469: Reference to a non-shared member requires an object reference.
Here is the code...
<%@ Control Language="VB" runat="server" %>
<script language="VB" runat="server">
Public Class clsEnterReport
Inherits System.Web.UI.UserControl
Public Event CancelClick()
Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs)
VisibleForm(false)
End Sub
Sub ReportForm()
VisibleForm(true)
End Sub
Sub CancelReport(sender As Object, e As System.EventArgs)
VisibleForm(false)
RaiseEvent CancelClick()
End Sub
Sub VisibleForm(blnForm as Boolean)
lblAmount.visible = blnForm
txtAmount.visible = blnForm
btnReport.visible = blnForm
btnCancel.visible = blnForm
End Sub
End Class
</script>
<table>
<tr><td class="bodytext"><asp:label ID="lblAmount" runat="server"
Text="Amount:" /></td>
<td class="bodytext"><asp:textbox runat="server" ID="txtAmount"
/></td></tr>
<tr><td class="bodytext"><asp:button ID="btnReport" runat="server"
Text="Submit Report" CssClass="btnClass" /></td><td
class="bodytext"><asp:button ID="btnCancel" runat="server" Text="Cancel"
CssClass="btnClass" OnClick="CancelReport" /></td></tr>
</table>
..
..
..
Any assistance would be very much appreciated!!!!
Thanks
john.
I am trying to work out how to make reference to an asp textbox control
within a class, contained in a user control, but receive the following
error...
BC30469: Reference to a non-shared member requires an object reference.
Here is the code...
<%@ Control Language="VB" runat="server" %>
<script language="VB" runat="server">
Public Class clsEnterReport
Inherits System.Web.UI.UserControl
Public Event CancelClick()
Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs)
VisibleForm(false)
End Sub
Sub ReportForm()
VisibleForm(true)
End Sub
Sub CancelReport(sender As Object, e As System.EventArgs)
VisibleForm(false)
RaiseEvent CancelClick()
End Sub
Sub VisibleForm(blnForm as Boolean)
lblAmount.visible = blnForm
txtAmount.visible = blnForm
btnReport.visible = blnForm
btnCancel.visible = blnForm
End Sub
End Class
</script>
<table>
<tr><td class="bodytext"><asp:label ID="lblAmount" runat="server"
Text="Amount:" /></td>
<td class="bodytext"><asp:textbox runat="server" ID="txtAmount"
/></td></tr>
<tr><td class="bodytext"><asp:button ID="btnReport" runat="server"
Text="Submit Report" CssClass="btnClass" /></td><td
class="bodytext"><asp:button ID="btnCancel" runat="server" Text="Cancel"
CssClass="btnClass" OnClick="CancelReport" /></td></tr>
</table>
..
..
..
Any assistance would be very much appreciated!!!!
Thanks
john.