Ask a Question related to ASP.NET General, Design and Development.
-
Boban Dragojlovic #1
Getting custom properties on a user control
I created a user web control, and here is the line in my ASPX that consumes
that control.
<joe:RunningSummary CurrentStep=2 id=myRunningSummary runat=server />
The "CurrentStep=2" is supposed to be a "custom property" and I would invoke
this user control with different values on various web forms.
How do I retrieve the value of "CurrentStep" within the code-behind of the
user control?
Boban Dragojlovic Guest
-
Making Custom Control Properties Visible in Visual Studio's Properties Palette
I am learning how to use the System.ComponentModel class in VB.NET so that I can add my ASP.NET controls to Visual Studio .NET 2003. I have managed... -
Accessing properties in custom control
Hi all, This is probably a newbie question, but... I have a custom control inherited from System.Web.UI.WebControls.Table. Here is the code: ... -
asp.net page not seeing custom control, can't set properties
I have a asp.net.vb page with a custom control, and for some reason the codebehind is not seeing the control. The control is in a file... -
Accessing custom control properties
Hello, I've created a custom control and want to set properties in the aspx page. <%@ Page language="c#" Codebehind="test_control2.aspx.cs"... -
Custom Control - inherit child properties?
Hey All, I'm building a custom control that contains a System.Web.UI.WebControls.Calendar object and am wondering about how to make the calendar's... -
PJ #2
Re: Getting custom properties on a user control
just as you would any property from any control. assuming that you have
your property defined in your control something like this
[Bindable(True), Category("Behavior"), DefaultValue("")]
Public CurrentStep() As Integer
{
get { return ViewState["step"]; }
set { ViewState["step"] = value; }
}
//in page code behind
protected RunningSummary rs;
....
rs.CurrentStep = 12;
~PJ
"Boban Dragojlovic" <news@_N_O_S_P_AM_dragojlovic.org> wrote in message
news:Et3Ka.1062$j31.118032567@newssvr21.news.prodi gy.com...consumes>
> I created a user web control, and here is the line in my ASPX thatinvoke> that control.
>
> <joe:RunningSummary CurrentStep=2 id=myRunningSummary runat=server />
>
>
> The "CurrentStep=2" is supposed to be a "custom property" and I would> this user control with different values on various web forms.
>
>
> How do I retrieve the value of "CurrentStep" within the code-behind of the
> user control?
>
>
>
PJ Guest



Reply With Quote

