I have a collection of controls I am using on several pages. I have:
1 Image
2 Labels
I want to combine these so that I will also have certain properties
available programatically.
I want to be able to set a 'photoId' Property, that, when set, will call
data from a database, set the Image's src property, and set the Label text.
I want 2 other properties (ReadOnly) to be available programatically, that
when the Get is fired, checks a couple of things and returns the result.
I know how to do all this, except to combine them in one control that I can
reuse. I'm doing it over and over again in 3 or 4 pages, but when I tried to
create a user control with codebehind, I am running into trouble.
Can you point me to online resources that could give me a walkthrough? 3 1152
I learned how to do user controls from this MSDN article (there are a number
of sub-articles in the TOC on the left): http://msdn.microsoft.com/library/de...bformspage.asp
Hope that helps.
"M K" wrote: I have a collection of controls I am using on several pages. I have: 1 Image 2 Labels
I want to combine these so that I will also have certain properties available programatically.
I want to be able to set a 'photoId' Property, that, when set, will call data from a database, set the Image's src property, and set the Label text.
I want 2 other properties (ReadOnly) to be available programatically, that when the Get is fired, checks a couple of things and returns the result.
I know how to do all this, except to combine them in one control that I can reuse. I'm doing it over and over again in 3 or 4 pages, but when I tried to create a user control with codebehind, I am running into trouble.
Can you point me to online resources that could give me a walkthrough?
I would highly recommend the book ASP.NET Server controls and components,
written by Nikhil Kothari. http://www.nikhilk.net/ (look to the right)
It is singlely the best asp.net book I have read.
This one comes close, but really doesn't have anything to do with server
controls or asp.net. http://www.amazon.com/exec/obidos/tg...59347?v=glance
HTH,
bill
"M K" <ma**@nospamcenturycolor.com> wrote in message
news:6D**********************************@microsof t.com... I have a collection of controls I am using on several pages. I have: 1 Image 2 Labels
I want to combine these so that I will also have certain properties available programatically.
I want to be able to set a 'photoId' Property, that, when set, will call data from a database, set the Image's src property, and set the Label
text. I want 2 other properties (ReadOnly) to be available programatically, that when the Get is fired, checks a couple of things and returns the result.
I know how to do all this, except to combine them in one control that I
can reuse. I'm doing it over and over again in 3 or 4 pages, but when I tried
to create a user control with codebehind, I am running into trouble.
Can you point me to online resources that could give me a walkthrough?
That helped, got me in the right direction. The thing I don't like, is now I
have to address my object like this:
CType(Me.Preview1, previewCtrl).ImageOrderNum = Me._jobNum
CType(Me.Preview1, previewCtrl).PhotoID = Me._photo
whenever I want to access properties.
Monday I am going to try to work on raising and handling events from that in
the consuming pageI am wondering if I may need to create my own server
control... but I'm not sure.
"Patridge" wrote: I learned how to do user controls from this MSDN article (there are a number of sub-articles in the TOC on the left): http://msdn.microsoft.com/library/de...bformspage.asp
Hope that helps.
"M K" wrote:
I have a collection of controls I am using on several pages. I have: 1 Image 2 Labels
I want to combine these so that I will also have certain properties available programatically.
I want to be able to set a 'photoId' Property, that, when set, will call data from a database, set the Image's src property, and set the Label text.
I want 2 other properties (ReadOnly) to be available programatically, that when the Get is fired, checks a couple of things and returns the result.
I know how to do all this, except to combine them in one control that I can reuse. I'm doing it over and over again in 3 or 4 pages, but when I tried to create a user control with codebehind, I am running into trouble.
Can you point me to online resources that could give me a walkthrough? This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: DrUg13 |
last post by:
In java, this seems so easy. You need a new object
Object test = new Object() gives me exactly what I want.
could someone please help me understand the different ways to do the
same thing in...
|
by: Matt Kruse |
last post by:
http://www.JavascriptToolbox.com/bestpractices/
I started writing this up as a guide for some people who were looking for
general tips on how to do things the 'right way' with Javascript. Their...
|
by: 42 |
last post by:
Hi,
Stupid question:
I keep bumping into the desire to create classes and properties with the
same name and the current favored naming conventions aren't
automatically differentiating them......
|
by: sleigh |
last post by:
Hello,
I'm building a web application that will build a dynamic form based
upon questions in a database. This form will have several different
sections that consist of a panel containing one to...
|
by: Harry |
last post by:
Hello,
I have a composite WebControl that I'm dynamically instantiating at
runtime using Reflection. When I create a new instance of my control I
immediately iterate through it's child control...
|
by: Mark Olbert |
last post by:
This involves a family of related, databound ASPNET2 composite controls.
I've managed to arrange things so that the composite controls restore themselves from ViewState on postback after they're...
|
by: Ned Balzer |
last post by:
Hi all,
I am pretty new to asp.net; I've done lots of classic asp, but am just
beginning to get my mind wrapped around .net.
What I'd like to do is include some code that tests if a user is...
|
by: Peter Rilling |
last post by:
Hi,
I am creating some ASP.NET composite server controls (inheriting from
CompositeControl). Right now I have the styles for the various objects
hardcoded, but what I would like to do is allow...
|
by: shapper |
last post by:
Hello,
I am working in a class library with various custom controls.
In which cases should a control inherit Control, WebControl and
CompositeControl classes?
And when should a custom...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
| | |