Hey
ASP.NET 2.0
I'm about to create a UserControl for my web project, but I'm wondering if I
need to create 2 UserControls instead. Because these UserControls will be
very similar, the only difference between them will be that one of these
UserControls are containing a control (also being a UserControl, lets call
it "A"), which the other UserControl don't contain!
So I thought about creating 2 different UserControls... but I guess this
would be bad, because these 2 UserControls will have the same markup, except
one the UserControls have a control ("A", mention above) which the other
userControl don't have
Or I could instead create only 1 UserControl, have have some logic in it
which hide or show the control ("A"). In this way I could use only
UserControl and use some kind of logic to hide or show this extra control
("A")... I guess this approach is the best, but would like to know your
thought about this too?
Best Regards
Jeff 4 1273
I prefer the second approach because it is easy to make changes later at one
place instead of two.
"Jeff" <it************@hotmail.com.NOSPAMwrote in message
news:u2**************@TK2MSFTNGP05.phx.gbl...
Hey
ASP.NET 2.0
I'm about to create a UserControl for my web project, but I'm wondering if I
need to create 2 UserControls instead. Because these UserControls will be
very similar, the only difference between them will be that one of these
UserControls are containing a control (also being a UserControl, lets call
it "A"), which the other UserControl don't contain!
So I thought about creating 2 different UserControls... but I guess this
would be bad, because these 2 UserControls will have the same markup, except
one the UserControls have a control ("A", mention above) which the other
userControl don't have
Or I could instead create only 1 UserControl, have have some logic in it
which hide or show the control ("A"). In this way I could use only
UserControl and use some kind of logic to hide or show this extra control
("A")... I guess this approach is the best, but would like to know your
thought about this too?
Best Regards
Jeff
I agree on that but if I hide the control, will the UserControl display
still reserve space for the hided control?
In other words this control I want to hide/show is (400 pixels height and
witdth=100%) placed at the top of the UserControl. If this control is hidden
will the UserControl still reserve space (400 pixels height and witdth=100%)
for the hidden control??....
and in what event should I hide/show the control?
Jeff
"Siva M" <sh******@online.excite.comwrote in message
news:OR****************@TK2MSFTNGP02.phx.gbl...
>I prefer the second approach because it is easy to make changes later at one
place instead of two.
"Jeff" <it************@hotmail.com.NOSPAMwrote in message
news:u2**************@TK2MSFTNGP05.phx.gbl...
Hey
ASP.NET 2.0
I'm about to create a UserControl for my web project, but I'm wondering if
I
need to create 2 UserControls instead. Because these UserControls will be
very similar, the only difference between them will be that one of these
UserControls are containing a control (also being a UserControl, lets call
it "A"), which the other UserControl don't contain!
So I thought about creating 2 different UserControls... but I guess this
would be bad, because these 2 UserControls will have the same markup,
except
one the UserControls have a control ("A", mention above) which the other
userControl don't have
Or I could instead create only 1 UserControl, have have some logic in it
which hide or show the control ("A"). In this way I could use only
UserControl and use some kind of logic to hide or show this extra control
("A")... I guess this approach is the best, but would like to know your
thought about this too?
Best Regards
Jeff
Set the Visible property to False. This wil not generate any markup nor will
it occupy any space on the browser.
Page Load event may be used to show/hide the control.
"Jeff" <it************@hotmail.com.NOSPAMwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
I agree on that but if I hide the control, will the UserControl display
still reserve space for the hided control?
In other words this control I want to hide/show is (400 pixels height and
witdth=100%) placed at the top of the UserControl. If this control is hidden
will the UserControl still reserve space (400 pixels height and witdth=100%)
for the hidden control??....
and in what event should I hide/show the control?
Jeff
"Siva M" <sh******@online.excite.comwrote in message
news:OR****************@TK2MSFTNGP02.phx.gbl...
>I prefer the second approach because it is easy to make changes later at one
place instead of two.
"Jeff" <it************@hotmail.com.NOSPAMwrote in message
news:u2**************@TK2MSFTNGP05.phx.gbl...
Hey
ASP.NET 2.0
I'm about to create a UserControl for my web project, but I'm wondering if
I
need to create 2 UserControls instead. Because these UserControls will be
very similar, the only difference between them will be that one of these
UserControls are containing a control (also being a UserControl, lets call
it "A"), which the other UserControl don't contain!
So I thought about creating 2 different UserControls... but I guess this
would be bad, because these 2 UserControls will have the same markup,
except
one the UserControls have a control ("A", mention above) which the other
userControl don't have
Or I could instead create only 1 UserControl, have have some logic in it
which hide or show the control ("A"). In this way I could use only
UserControl and use some kind of logic to hide or show this extra control
("A")... I guess this approach is the best, but would like to know your
thought about this too?
Best Regards
Jeff
Thanks!
"Siva M" <sh******@online.excite.comwrote in message
news:eT**************@TK2MSFTNGP03.phx.gbl...
Set the Visible property to False. This wil not generate any markup nor
will
it occupy any space on the browser.
Page Load event may be used to show/hide the control.
"Jeff" <it************@hotmail.com.NOSPAMwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
I agree on that but if I hide the control, will the UserControl display
still reserve space for the hided control?
In other words this control I want to hide/show is (400 pixels height and
witdth=100%) placed at the top of the UserControl. If this control is
hidden
will the UserControl still reserve space (400 pixels height and
witdth=100%)
for the hidden control??....
and in what event should I hide/show the control?
Jeff
"Siva M" <sh******@online.excite.comwrote in message
news:OR****************@TK2MSFTNGP02.phx.gbl...
>>I prefer the second approach because it is easy to make changes later at one place instead of two.
"Jeff" <it************@hotmail.com.NOSPAMwrote in message news:u2**************@TK2MSFTNGP05.phx.gbl... Hey
ASP.NET 2.0
I'm about to create a UserControl for my web project, but I'm wondering if I need to create 2 UserControls instead. Because these UserControls will be very similar, the only difference between them will be that one of these UserControls are containing a control (also being a UserControl, lets call it "A"), which the other UserControl don't contain!
So I thought about creating 2 different UserControls... but I guess this would be bad, because these 2 UserControls will have the same markup, except one the UserControls have a control ("A", mention above) which the other userControl don't have
Or I could instead create only 1 UserControl, have have some logic in it which hide or show the control ("A"). In this way I could use only UserControl and use some kind of logic to hide or show this extra control ("A")... I guess this approach is the best, but would like to know your thought about this too?
Best Regards
Jeff
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Steven T. Hatton |
last post by:
This is something I've been looking at because it is central to a currently
broken part of the KDevelop new application wizard. I'm not complaining
about it being broken, It's a CVS images. ...
|
by: Jason Huang |
last post by:
Hi,
Would someone explain the following coding more detail for me? What's the
( ) for?
CurrentText = (TextBox)e.Item.Cells.Controls;
Thanks.
Jason
|
by: Midnight Java Junkie |
last post by:
Dear Colleagues:
I feel that the dumbest questions are those that are never asked. I have
been given the opportunity to get into .NET. Our organization has a
subscription with Microsoft that...
|
by: Simon Says |
last post by:
Hi all,
I've a message object that is serialized to a xml string and communicating
between a client and server with a connection-oriented (TCP) socket. Unlike
a UDP, in a TCP socket, the...
|
by: Henrik |
last post by:
Hi
Is there any way to see what the System process is doing?
We have developed an application running at a production site to measure and
optimize the production. The application needs to be...
|
by: Gummy |
last post by:
Hello,
I created a user control that has a ListBox and a RadioButtonList (and other
stuff). The idea is that I put the user control on the ASPX page multiple
times and each user control will...
|
by: jim |
last post by:
In a thread about wrapping .Net applications using Thinstall and Xenocode,
it was pointed out that there may be better programming languages/IDEs to
use for the purpose of creating standalone,...
|
by: timor.super |
last post by:
Hi all,
Imagine I've an array of int :
int anArray = new int;
I want to extract all the integer that are superior to 500
I can do :
|
by: Yee.Chuang |
last post by:
When I began to learn C, My teacher told me that pointer is the most
difficult part of C, it makes me afraid of it. After finishing C
program class, I found that all the code I wrote in C contains...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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...
|
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...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
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...
|
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...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
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...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
| |