URGENT: <asp:Button> nested in Custom Control not getting fired.

nju0843

Member
Joined
Jul 7, 2005
Messages
16
Location
Lafayette, LA
Programming Experience
5-10
I hate marking things urgent...
I am on a deadline and I need to know how to fix my issue.
I need this by noon so ANY help will be greatly appreciated!
My co-worker wrote some nice HTML and CSS to make a
rounded box in our webpages. We decided we wanted to use this
same style in other applications we work on so I decided to put it in a
Custom Control <cc1:StullerBorder>. Everything displays just fine!
The problem comes in when I add a regular <asp:Button> within the StullerBorder tags. A postback occurs, but no click event fires.
If I create a separate button outside of my StullerBorder tags it works fine.

Here is my Custom Control:
VB.NET:
[SIZE=1][COLOR=#0000ff]Imports[/COLOR][/SIZE][SIZE=1] System.ComponentModel
[/SIZE][SIZE=1][COLOR=#0000ff]Imports[/COLOR][/SIZE][SIZE=1] System.Web.UI
<DefaultProperty("Text"), _
ToolboxData("<{0}:StullerBorders runat=server></{0}:StullerBorders>"), _
ParseChildren([/SIZE][SIZE=1][COLOR=#0000ff]False[/COLOR][/SIZE][SIZE=1])> _
[/SIZE][SIZE=1][COLOR=#0000ff]Public[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]Class[/COLOR][/SIZE][SIZE=1] StullerBorders
[/SIZE][SIZE=1][COLOR=#0000ff]Inherits[/COLOR][/SIZE][SIZE=1] System.Web.UI.Control
[/SIZE][SIZE=1][COLOR=#0000ff]Implements[/COLOR][/SIZE][SIZE=1] IPostBackDataHandler
#[/SIZE][SIZE=1][COLOR=#0000ff]Region[/COLOR][/SIZE][SIZE=1] "Contstructor"
[/SIZE][SIZE=1][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=1] _text [/SIZE][SIZE=1][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]String
[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=1] _title [/SIZE][SIZE=1][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]String
[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=1] _items [/SIZE][SIZE=1][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=1] ArrayList
[/SIZE][SIZE=1][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=1] _headeronclick [/SIZE][SIZE=1][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]String
[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=1] _headeralign [/SIZE][SIZE=1][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]String
[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]Public[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]Sub[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=1]()
_items = [/SIZE][SIZE=1][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=1] ArrayList
[/SIZE][SIZE=1][COLOR=#0000ff]End[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]Sub
[/COLOR][/SIZE][SIZE=1]#[/SIZE][SIZE=1][COLOR=#0000ff]End[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]Region
[/COLOR][/SIZE][SIZE=1]#[/SIZE][SIZE=1][COLOR=#0000ff]Region[/COLOR][/SIZE][SIZE=1] "Properties"
<Bindable([/SIZE][SIZE=1][COLOR=#0000ff]True[/COLOR][/SIZE][SIZE=1]), Category("Appearance"), DefaultValue("")> _
[/SIZE][SIZE=1][COLOR=#0000ff]Property[/COLOR][/SIZE][SIZE=1] [Text]() [/SIZE][SIZE=1][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]String
[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]Get
[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]Return[/COLOR][/SIZE][SIZE=1] _text
[/SIZE][SIZE=1][COLOR=#0000ff]End[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]Get
[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]Set[/COLOR][/SIZE][SIZE=1]([/SIZE][SIZE=1][COLOR=#0000ff]ByVal[/COLOR][/SIZE][SIZE=1] Value [/SIZE][SIZE=1][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]String[/COLOR][/SIZE][SIZE=1])
_text = Value
[/SIZE][SIZE=1][COLOR=#0000ff]End[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]Set
[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]End[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]Property
[/COLOR][/SIZE][SIZE=1]<Bindable([/SIZE][SIZE=1][COLOR=#0000ff]True[/COLOR][/SIZE][SIZE=1]), Category("Appearance"), DefaultValue("")> _
[/SIZE][SIZE=1][COLOR=#0000ff]Property[/COLOR][/SIZE][SIZE=1] [Title]() [/SIZE][SIZE=1][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]String
[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]Get
[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]Return[/COLOR][/SIZE][SIZE=1] _title
[/SIZE][SIZE=1][COLOR=#0000ff]End[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]Get
[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]Set[/COLOR][/SIZE][SIZE=1]([/SIZE][SIZE=1][COLOR=#0000ff]ByVal[/COLOR][/SIZE][SIZE=1] Value [/SIZE][SIZE=1][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]String[/COLOR][/SIZE][SIZE=1])
_title = Value
[/SIZE][SIZE=1][COLOR=#0000ff]End[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]Set
[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]End[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]Property
[/COLOR][/SIZE][SIZE=1]<Bindable([/SIZE][SIZE=1][COLOR=#0000ff]True[/COLOR][/SIZE][SIZE=1]), Category("Appearance"), DefaultValue("")> _
[/SIZE][SIZE=1][COLOR=#0000ff]Property[/COLOR][/SIZE][SIZE=1] [HeaderAlign]() [/SIZE][SIZE=1][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]String
[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]Get
[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]Return[/COLOR][/SIZE][SIZE=1] _headeralign
[/SIZE][SIZE=1][COLOR=#0000ff]End[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]Get
[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]Set[/COLOR][/SIZE][SIZE=1]([/SIZE][SIZE=1][COLOR=#0000ff]ByVal[/COLOR][/SIZE][SIZE=1] Value [/SIZE][SIZE=1][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]String[/COLOR][/SIZE][SIZE=1])
_headeralign = Value
[/SIZE][SIZE=1][COLOR=#0000ff]End[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]Set
[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]End[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]Property
[/COLOR][/SIZE][SIZE=1]<Bindable([/SIZE][SIZE=1][COLOR=#0000ff]True[/COLOR][/SIZE][SIZE=1]), Category("Appearance"), DefaultValue("")> _
[/SIZE][SIZE=1][COLOR=#0000ff]Property[/COLOR][/SIZE][SIZE=1] [HeaderOnClick]() [/SIZE][SIZE=1][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]String
[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]Get
[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]Return[/COLOR][/SIZE][SIZE=1] _headeronclick
[/SIZE][SIZE=1][COLOR=#0000ff]End[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]Get
[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]Set[/COLOR][/SIZE][SIZE=1]([/SIZE][SIZE=1][COLOR=#0000ff]ByVal[/COLOR][/SIZE][SIZE=1] Value [/SIZE][SIZE=1][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]String[/COLOR][/SIZE][SIZE=1])
_headeronclick = Value
[/SIZE][SIZE=1][COLOR=#0000ff]End[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]Set
[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]End[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]Property
[/COLOR][/SIZE][SIZE=1]#[/SIZE][SIZE=1][COLOR=#0000ff]End[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]Region
[/COLOR][/SIZE][SIZE=1]#[/SIZE][SIZE=1][COLOR=#0000ff]Region[/COLOR][/SIZE][SIZE=1] "Methods"
[/SIZE][SIZE=1][COLOR=#0000ff]Protected[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]Overrides[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]Sub[/COLOR][/SIZE][SIZE=1] AddParsedSubObject([/SIZE][SIZE=1][COLOR=#0000ff]ByVal[/COLOR][/SIZE][SIZE=1] obj [/SIZE][SIZE=1][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]Object[/COLOR][/SIZE][SIZE=1])
[/SIZE][SIZE=1][COLOR=#0000ff]If[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]TypeOf[/COLOR][/SIZE][SIZE=1] (obj) [/SIZE][SIZE=1][COLOR=#0000ff]Is[/COLOR][/SIZE][SIZE=1] WebControls.TextBox [/SIZE][SIZE=1][COLOR=#0000ff]Then
[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=1] tb [/SIZE][SIZE=1][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=1] WebControls.TextBox = [/SIZE][SIZE=1][COLOR=#0000ff]CType[/COLOR][/SIZE][SIZE=1](obj, WebControls.TextBox)
[/SIZE][SIZE=1][COLOR=#0000ff]End[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]If
[/COLOR][/SIZE][SIZE=1]_items.Add(obj)
[/SIZE][SIZE=1][COLOR=#0000ff]End[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]Sub
[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]Private[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]Sub[/COLOR][/SIZE][SIZE=1] StullerBorders_PreRender([/SIZE][SIZE=1][COLOR=#0000ff]ByVal[/COLOR][/SIZE][SIZE=1] sender [/SIZE][SIZE=1][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]Object[/COLOR][/SIZE][SIZE=1], [/SIZE][SIZE=1][COLOR=#0000ff]ByVal[/COLOR][/SIZE][SIZE=1] e [/SIZE][SIZE=1][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=1] System.EventArgs) [/SIZE][SIZE=1][COLOR=#0000ff]Handles[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]MyBase[/COLOR][/SIZE][SIZE=1].PreRender
[/SIZE][SIZE=1][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=1] toggleID [/SIZE][SIZE=1][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]String[/COLOR][/SIZE][SIZE=1] = "toggle_" + [/SIZE][SIZE=1][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=1].ID
[/SIZE][SIZE=1][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=1] togglesearchID [/SIZE][SIZE=1][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]String[/COLOR][/SIZE][SIZE=1] = "toggleSearch_" + [/SIZE][SIZE=1][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=1].ID
[/SIZE][SIZE=1][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=1] advancedusersearchID [/SIZE][SIZE=1][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]String[/COLOR][/SIZE][SIZE=1] = "advancedusersearch_" + [/SIZE][SIZE=1][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=1].ID
[/SIZE][SIZE=1][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=1].Controls.Add([/SIZE][SIZE=1][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=1] LiteralControl("<table class=""sTableInner"" id=""tdheader"">"))
[/SIZE][SIZE=1][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=1].Controls.Add([/SIZE][SIZE=1][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=1] LiteralControl(" <tr>"))
[/SIZE][SIZE=1][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=1].Controls.Add([/SIZE][SIZE=1][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=1] LiteralControl(" <td class=""sTableTopLeft""><img src=" + """" + "/stuller_images/stullercontrols/spacer.gif" + """" + " height=""7"" width=""7""></td>"))
[/SIZE][SIZE=1][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=1].Controls.Add([/SIZE][SIZE=1][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=1] LiteralControl(" <td class=""sTableTopMid"" width=""100%""></td>"))
[/SIZE][SIZE=1][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=1].Controls.Add([/SIZE][SIZE=1][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=1] LiteralControl(" <td class=""sTableTopRight""><img src=" + """" + "/stuller_images/stullercontrols/spacer.gif" + """" + " height=""7"" width=""7""></td>"))
[/SIZE][SIZE=1][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=1].Controls.Add([/SIZE][SIZE=1][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=1] LiteralControl(" </tr>"))
[/SIZE][SIZE=1][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=1].Controls.Add([/SIZE][SIZE=1][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=1] LiteralControl(" <tr>"))
[/SIZE][SIZE=1][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=1].Controls.Add([/SIZE][SIZE=1][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=1] LiteralControl(" <td class=""sTableMidLeft""></td>"))
[/SIZE][SIZE=1][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=1].Controls.Add([/SIZE][SIZE=1][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=1] LiteralControl(" <td class=""sTableMid"">"))
[/SIZE][SIZE=1][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=1].Controls.Add([/SIZE][SIZE=1][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=1] LiteralControl(" <table width=""100%"">"))
[/SIZE][SIZE=1][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=1].Controls.Add([/SIZE][SIZE=1][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=1] LiteralControl(" <tr class=""sGridColumnHeader"">"))
[/SIZE][SIZE=1][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=1].Controls.Add([/SIZE][SIZE=1][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=1] LiteralControl(" <td align= " + """" + [HeaderAlign] + """" + " width=""100%"" onclick=" + """" + "javascript:toggleSearch('" + togglesearchID + "','" + advancedusersearchID + "');" + """" + ">" + [Title] + "</td>"))
[/SIZE][SIZE=1][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=1].Controls.Add([/SIZE][SIZE=1][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=1] LiteralControl(" <td align=" + """" + "right" + """" + " style=""DISPLAY:none"" id=" + """" + toggleID + """" + """><a href=""javascript:toggleSearch('" + togglesearchID + "','" + advancedusersearchID + "');"" id=" + """" + togglesearchID + """" + ">Hide</a></td>"))
[/SIZE][SIZE=1][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=1].Controls.Add([/SIZE][SIZE=1][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=1] LiteralControl(" </tr>"))
[/SIZE][SIZE=1][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=1].Controls.Add([/SIZE][SIZE=1][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=1] LiteralControl(" </table>"))
[/SIZE][SIZE=1][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=1].Controls.Add([/SIZE][SIZE=1][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=1] LiteralControl(" </td>"))
[/SIZE][SIZE=1][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=1].Controls.Add([/SIZE][SIZE=1][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=1] LiteralControl(" <td class=""sTableMidRight""></td>"))
[/SIZE][SIZE=1][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=1].Controls.Add([/SIZE][SIZE=1][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=1] LiteralControl(" </tr>"))
[/SIZE][SIZE=1][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=1].Controls.Add([/SIZE][SIZE=1][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=1] LiteralControl(" </table>"))
[/SIZE][SIZE=1][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=1].Controls.Add([/SIZE][SIZE=1][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=1] LiteralControl(" <table class=""sTableInner"" id=" + """" + advancedusersearchID + """>"))
[/SIZE][SIZE=1][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=1].Controls.Add([/SIZE][SIZE=1][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=1] LiteralControl(" <tr height=""100%"" valign=""top"">"))
[/SIZE][SIZE=1][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=1].Controls.Add([/SIZE][SIZE=1][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=1] LiteralControl(" <td class=""wTableMidLeft""></td>"))
[/SIZE][SIZE=1][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=1].Controls.Add([/SIZE][SIZE=1][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=1] LiteralControl(" <td class=""wTableMid"" width=""100%"">"))
[/SIZE][SIZE=1][COLOR=#0000ff]For[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]Each[/COLOR][/SIZE][SIZE=1] x [/SIZE][SIZE=1][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]Object[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]In[/COLOR][/SIZE][SIZE=1] _items
[/SIZE][SIZE=1][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=1].Controls.Add(x)
[/SIZE][SIZE=1][COLOR=#0000ff]Next
[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=1].Controls.Add([/SIZE][SIZE=1][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=1] LiteralControl(" </td>"))
[/SIZE][SIZE=1][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=1].Controls.Add([/SIZE][SIZE=1][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=1] LiteralControl(" <td class=""wTableMidRight""></td>"))
[/SIZE][SIZE=1][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=1].Controls.Add([/SIZE][SIZE=1][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=1] LiteralControl(" </tr>"))
[/SIZE][SIZE=1][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=1].Controls.Add([/SIZE][SIZE=1][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=1] LiteralControl(" <tr>"))
[/SIZE][SIZE=1][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=1].Controls.Add([/SIZE][SIZE=1][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=1] LiteralControl(" <td class=""wTableBottomLeft""><img src=" + """" + "/stuller_images/stullercontrols/spacer.gif" + """" + " height=""7"" width=""7""></td>"))
[/SIZE][SIZE=1][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=1].Controls.Add([/SIZE][SIZE=1][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=1] LiteralControl(" <td class=""wTableBottomMid""></td>"))
[/SIZE][SIZE=1][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=1].Controls.Add([/SIZE][SIZE=1][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=1] LiteralControl(" <td class=""wTableBottomRight""><img src=" + """" + "/stuller_images/stullercontrols/spacer.gif" + """" + " height=""7"" width=""7""></td>"))
[/SIZE][SIZE=1][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=1].Controls.Add([/SIZE][SIZE=1][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=1] LiteralControl(" </tr>"))
[/SIZE][SIZE=1][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=1].Controls.Add([/SIZE][SIZE=1][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=1] LiteralControl("</table>"))
[/SIZE][SIZE=1][COLOR=#0000ff]End[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]Sub
[/COLOR][/SIZE][SIZE=1]#[/SIZE][SIZE=1][COLOR=#0000ff]End[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]Region
[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]Public[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]Function[/COLOR][/SIZE][SIZE=1] LoadPostData([/SIZE][SIZE=1][COLOR=#0000ff]ByVal[/COLOR][/SIZE][SIZE=1] postDataKey [/SIZE][SIZE=1][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]String[/COLOR][/SIZE][SIZE=1], [/SIZE][SIZE=1][COLOR=#0000ff]ByVal[/COLOR][/SIZE][SIZE=1] postCollection [/SIZE][SIZE=1][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=1] System.Collections.Specialized.NameValueCollection) [/SIZE][SIZE=1][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]Boolean[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]Implements[/COLOR][/SIZE][SIZE=1] System.Web.UI.IPostBackDataHandler.LoadPostData
[/SIZE][SIZE=1][COLOR=#0000ff]End[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]Function
[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]Public[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]Sub[/COLOR][/SIZE][SIZE=1] RaisePostDataChangedEvent() [/SIZE][SIZE=1][COLOR=#0000ff]Implements[/COLOR][/SIZE][SIZE=1] System.Web.UI.IPostBackDataHandler.RaisePostDataChangedEvent
[/SIZE][SIZE=1][COLOR=#0000ff]End[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]Sub
End[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]Class
[/COLOR][/SIZE]

Here is my codebehind

VB.NET:
[SIZE=1][COLOR=#0000ff]Public[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]Class[/COLOR][/SIZE][SIZE=1] WebForm1
[/SIZE][SIZE=1][COLOR=#0000ff]Inherits[/COLOR][/SIZE][SIZE=1] System.Web.UI.Page
#[/SIZE][SIZE=1][COLOR=#0000ff]Region[/COLOR][/SIZE][SIZE=1] " Web Form Designer Generated Code "
[/SIZE][SIZE=1][COLOR=#008000]'This call is required by the Web Form Designer.
[/COLOR][/SIZE][SIZE=1]<System.Diagnostics.DebuggerStepThrough()> [/SIZE][SIZE=1][COLOR=#0000ff]Private[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]Sub[/COLOR][/SIZE][SIZE=1] InitializeComponent()
[/SIZE][SIZE=1][COLOR=#0000ff]End[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]Sub
[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]Protected[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]WithEvents[/COLOR][/SIZE][SIZE=1] StullerBorders1 [/SIZE][SIZE=1][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=1] StullerBorders.StullerBorders
[/SIZE][SIZE=1][COLOR=#008000]'NOTE: The following placeholder declaration is required by the Web Form Designer.
[/COLOR][/SIZE][SIZE=1][COLOR=#008000]'Do not delete or move it.
[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]Private[/COLOR][/SIZE][SIZE=1] designerPlaceholderDeclaration [/SIZE][SIZE=1][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=1] System.Object
[/SIZE][SIZE=1][COLOR=#0000ff]Private[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]Sub[/COLOR][/SIZE][SIZE=1] Page_Init([/SIZE][SIZE=1][COLOR=#0000ff]ByVal[/COLOR][/SIZE][SIZE=1] sender [/SIZE][SIZE=1][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=1] System.Object, [/SIZE][SIZE=1][COLOR=#0000ff]ByVal[/COLOR][/SIZE][SIZE=1] e [/SIZE][SIZE=1][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=1] System.EventArgs) [/SIZE][SIZE=1][COLOR=#0000ff]Handles[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]MyBase[/COLOR][/SIZE][SIZE=1].Init
[/SIZE][SIZE=1][COLOR=#008000]'CODEGEN: This method call is required by the Web Form Designer
[/COLOR][/SIZE][SIZE=1][COLOR=#008000]'Do not modify it using the code editor.
[/COLOR][/SIZE][SIZE=1]InitializeComponent()
[/SIZE][SIZE=1][COLOR=#0000ff]End[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]Sub
[/COLOR][/SIZE][SIZE=1]#[/SIZE][SIZE=1][COLOR=#0000ff]End[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]Region
[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]Protected[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]WithEvents[/COLOR][/SIZE][SIZE=1] btnHello [/SIZE][SIZE=1][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=1] System.Web.UI.WebControls.Button
[/SIZE][SIZE=1][COLOR=#0000ff]Protected[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]WithEvents[/COLOR][/SIZE][SIZE=1] lblLabel [/SIZE][SIZE=1][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=1] System.Web.UI.WebControls.Label
[/SIZE][SIZE=1][COLOR=#0000ff]Protected[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]WithEvents[/COLOR][/SIZE][SIZE=1] Button1 [/SIZE][SIZE=1][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=1] System.Web.UI.WebControls.Button
[/SIZE][SIZE=1][COLOR=#0000ff]Protected[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]WithEvents[/COLOR][/SIZE][SIZE=1] Label1 [/SIZE][SIZE=1][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=1] System.Web.UI.WebControls.Label
[/SIZE][SIZE=1][COLOR=#0000ff]Private[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]Sub[/COLOR][/SIZE][SIZE=1] Page_Load([/SIZE][SIZE=1][COLOR=#0000ff]ByVal[/COLOR][/SIZE][SIZE=1] sender [/SIZE][SIZE=1][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=1] System.Object, [/SIZE][SIZE=1][COLOR=#0000ff]ByVal[/COLOR][/SIZE][SIZE=1] e [/SIZE][SIZE=1][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=1] System.EventArgs) [/SIZE][SIZE=1][COLOR=#0000ff]Handles[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]MyBase[/COLOR][/SIZE][SIZE=1].Load
[/SIZE][SIZE=1][COLOR=#008000]'Put user code to initialize the page here
[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]AddHandler[/COLOR][/SIZE][SIZE=1] btnHello.Click, [/SIZE][SIZE=1][COLOR=#0000ff]AddressOf[/COLOR][/SIZE][SIZE=1] btnHello_Click
[/SIZE][SIZE=1][COLOR=#0000ff]End[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]Sub
[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]Private[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]Sub[/COLOR][/SIZE][SIZE=1] btnHello_Click([/SIZE][SIZE=1][COLOR=#0000ff]ByVal[/COLOR][/SIZE][SIZE=1] sender [/SIZE][SIZE=1][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=1] System.Object, [/SIZE][SIZE=1][COLOR=#0000ff]ByVal[/COLOR][/SIZE][SIZE=1] e [/SIZE][SIZE=1][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=1] System.EventArgs) [/SIZE][SIZE=1][COLOR=#0000ff]Handles[/COLOR][/SIZE][SIZE=1] btnHello.Click
lblLabel.Text = "You said hello to me!!!"
[/SIZE][SIZE=1][COLOR=#0000ff]End[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]Sub
[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]Private[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]Sub[/COLOR][/SIZE][SIZE=1] Hello1_Click([/SIZE][SIZE=1][COLOR=#0000ff]ByVal[/COLOR][/SIZE][SIZE=1] sender [/SIZE][SIZE=1][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=1] System.Object, [/SIZE][SIZE=1][COLOR=#0000ff]ByVal[/COLOR][/SIZE][SIZE=1] e [/SIZE][SIZE=1][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=1] System.EventArgs) [/SIZE][SIZE=1][COLOR=#0000ff]Handles[/COLOR][/SIZE][SIZE=1] Button1.Click
Label1.Text = "You said hello to me!!!"
[/SIZE][SIZE=1][COLOR=#0000ff]End[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]Sub
End[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]Class[/COLOR][/SIZE]

Here is my Webform1.aspx page
HTML:
<%@ Page Language="vb" AutoEventWireup="false" Codebehind="WebForm1.aspx.vb" Inherits="WebApplication2.WebForm1"%>
<%@ Register TagPrefix="cc1" Namespace="StullerBorders" Assembly="StullerBorders" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>WebForm1</title>
<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" content="Visual Basic .NET 7.1">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
<LINK href="/stuller_styles/stuller_layout.css" type="text/css" rel="stylesheet">
<LINK href="/stuller_styles/application_styles_new.css" type="text/css" rel="stylesheet">
<LINK href="/stuller_styles/gridStyle_new.css" type="text/css" rel="stylesheet">
<script language="javascript" src="/stuller_functions/stullerfunctions.js"></script>
</HEAD>
<body class="sTableOuter" MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server">
<table width="100%">
<tr>
<td width="100%">
<cc1:StullerBorders id="StullerBorders1" 
Title="Some New Title"
HeaderAlign="center"
runat="server">
<asp:Button id="btnHello" Text="Hello" Runat="server"></asp:Button>
<asp:Label id="lblLabel" Text="Not saying anything." Runat="server"></asp:Label>
</cc1:StullerBorders>
</td>
</tr>
<tr>
<td>
<asp:Button id="Button1" Text="Hello" runat="server"></asp:Button>
<asp:Label id="Label1" Text="Not saying anything." Runat="server"></asp:Label>
</td>
</tr>
</table>
</form>
</body>
</HTML>
 
Back
Top