473,394 Members | 1,746 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

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?

Nov 17 '05 #1
1 4999
PJ
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:Et**********************@newssvr21.news.prodi gy.com...

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?

Nov 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Steve Amey | last post by:
Hi all I am creating a basic control to perform some tasks, and I want to declare some events to be raised so they can be handled from the form that the control is on. I can create my own Event...
7
by: Martin Schulze | last post by:
Hello, i tried to compose myself a custom usercontrol which is derieved from System.Windows.Forms.UserControl. It contains 2 comboboxes and one textbox (which are also custom controls, but...
2
by: Pham Nguyen | last post by:
Has anyone seen an example of a textbox server control that has built-in client-side validation? I'd like to build a server control that extends the System.Web.UI.WebControls.TextBox class to allow...
1
by: Earl Teigrob | last post by:
Background: When I create a ASP.NET control (User or custom), it often requires security to be set for certain functionality with the control. For example, a news release user control that is...
3
by: Eric Sabine | last post by:
I've created a custom control (ascx) which contains a tree view, a drop down list, and a listbox. The custom control is included in a web form and at runtime, won't compile (I get the...
9
by: PJ6 | last post by:
I'm sure it's some attribute I have to set but I can't find it. I'd like to be able to have my properties in my custom web user controls show up in the web forms designer. Is that possible? Paul
6
by: | last post by:
I have made some user controls with custom properties. I can set those properties on instances of my user controls, and I have programmed my user control to do useful visual things in response to...
3
by: =?Utf-8?B?TWFyYyBXb29sZnNvbg==?= | last post by:
Hi, I think this is a relatively simple problem, but it's starting to annoy me quite a bit. I have two issues with a custom Web Part that I have created, both related to property editing at run...
1
by: Abdo Haji-Ali | last post by:
Previously I used to create user controls if I wanted to use a specific set of controls in multiple pages, however I want to deploy my control in other applications so I thought of creating custom...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.