Hi,
I have an aspx.vb page that contains a usercontrol (ascx.vb) page.
I have added the following line in main aspx.vb page.
<asp:ScriptManager ID="ScriptManager1" runat="server" AsyncPostBackTimeout ="360000"/>
In my usercotrol ascx page, I have the following 2 update panels.
My development envviornment id VWD 2010 with .NET 4. My question is ..in the checkbox click event procedure
Below in usercontrol page, the highlighted line does not recognized. There is a underline comes under UpdatePanelInfoExist and it says Update is not a member of ‘System.Web.ui.WebControls.Panel’ . The same type of codings are in my other aspx pages working fine but this code in the user control page gives me trouble..
UpdatePanelInfoExist.Update()
Any help to figure this out would be appreciated. Thanks!
‘********************************************************
<asp:UpdatePanel
ID="UpdateTestCheckBox"
runat="server"
UpdateMode="conditional">
<ContentTemplate>
<div class="item">
<div class="customize_item_left">
<asp:Label ID="Label1" runat="server" AssociatedControlID="TestCheckBox"> Update Test:</asp:Label>
</div>
<div class="customize_item_right">
<asp:CheckBox
ID="TestCheckBox"
runat="server"
OnCheckedChanged="TestCheckBox_CheckedChanged"
AutoPostBack="True" />
<asp:Label ID="TestHelp" runat="server" Text="Check here .."></asp:Label>
</div>
<div class="clear">
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
‘****************************************************************************
<asp:UpdatePanel ID="UpdatePanelInfoExist" UpdateMode="Conditional" runat="server">
<ContentTemplate>
<asp:Panel ID="PanelInfoExist" runat="server">
<div class="item">
<div class="customize_item_left_clear">
</div>
<div class="customize_item_right_box">
<asp:Label ID="lblYourInfoExist" runat="server" Text="Label"></asp:Label>
</div>
<div class="clear">
</div>
</div>
</asp:Panel>
</ContentTemplate>
</asp:UpdatePanel>
‘***************************************************************
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
PanelInfoExist.Visible = "False"
If Not Page.IsPostBack Then
Dim UpdatePanelInfoExist As Panel = CType(FindControl("UpdatePanelInfoExist "), Panel)
UpdatePanelInfoExist.Visible = False
End If
End Sub
‘*******************************************************
Protected Sub TestCheckBox_CheckedChanged(ByVal sender As Object, ByVal e As System.EventArgs)
If YourInfoManagement.IsTestExist(Page.User.Identity.Name) Then
Dim PanelInfoExist As Panel = CType(FindControl("PanelInfoExist"), Panel)
PanelInfoExist.Visible = True
Dim UpdatePanelInfoExist As Panel = CType(FindControl("UpdatePanelInfoExist"), Panel)
Dim lblYourInfoExist As Label = CType(FindControl("lblYourInfoExist"), Label)
lblYourInfoExist.Text = "<b>Note:</b>Your Info profile is already in our database”
UpdatePanelInfoExist.Update() ' This gives error ->"Update is not a member of ‘System.Web.ui.WebControls.Panel’ "
End If
End Sub
‘************************