473,385 Members | 1,798 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,385 software developers and data experts.

Hiding Controls in aspx page dynamically:

Hi all
I have been fighting to get this working.. I have a form with several text
boxes which posts back when an user fills and submits. I want to hide the
textboxes on postback and display some message based on some server rules.
Do I have to loop through each and every text box and set the visible
property to False? Or is tehre some easier way to do? Please give me some
code hint.

Thanks
V
Jul 21 '05 #1
2 1395
You can probably wrap the related controls in a Panel or div and then set
the visibility for the single object.

"Varad" <va******@gmail.com> wrote in message
news:DF**********************************@microsof t.com...
Hi all
I have been fighting to get this working.. I have a form with several text boxes which posts back when an user fills and submits. I want to hide the
textboxes on postback and display some message based on some server rules.
Do I have to loop through each and every text box and set the visible
property to False? Or is tehre some easier way to do? Please give me some
code hint.

Thanks
V

Jul 21 '05 #2
Thanks Peter. I think panel might be the way to go.

"Peter Rilling" wrote:
You can probably wrap the related controls in a Panel or div and then set
the visibility for the single object.

"Varad" <va******@gmail.com> wrote in message
news:DF**********************************@microsof t.com...
Hi all
I have been fighting to get this working.. I have a form with several

text
boxes which posts back when an user fills and submits. I want to hide the
textboxes on postback and display some message based on some server rules.
Do I have to loop through each and every text box and set the visible
property to False? Or is tehre some easier way to do? Please give me some
code hint.

Thanks
V


Jul 21 '05 #3

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

Similar topics

1
by: Robert Howells | last post by:
Perhaps I'm just too new at this to pull it off, or perhaps it's just bad architecture. I'd appreciate some feedback on the the wisdom (or lack thereof) in attempting the following: I'm not new...
4
by: Sandeep | last post by:
Hi I am doing one thing in my website ,actually i want to add controls dynamically to a web form and want to access the elements but when i postback the form,and access that control, it gives...
1
by: Kamal Jeet Singh | last post by:
Hi Friends !! I am have facing problem in controlling the dynamically created controls on web page. The problem Scenario is Scenario:- My requirement is to load the web user controls on the...
1
by: Kamal Jeet Singh | last post by:
Hi Friends !! I am facing problem in controlling the dynamically created controls on web page. The problem Scenario is Scenario:- My requirement is to load the web user controls on the web...
3
by: Nathan Sokalski | last post by:
When I view any page in my application a second time, I recieve the following error: System.Web.TraceContext.AddNewControl(String id, String parentId, String type, Int32 viewStateSize) +313...
22
by: Mr Newbie | last post by:
I was thinking about developing a workflow application yesterday and was musing over the different approaches than one could take in restricting specific actions on a ticket( Form ) at any said...
2
by: kens | last post by:
I've found some odd behavior in dynamically loaded user controls under ASP.NET 2.0. Specifically, if I load a control dynamically, in the "Page_Load" event, the code-behind for the user control is...
9
by: netasp | last post by:
hi all, how can I populate one aspx form when page is loading based on page ID? for example: loading page A (to search for VB code) would display labels and texboxes, dropdown lists all related...
4
by: rn5a | last post by:
Assume that a ASPX page uses a user control named Address.ascx which has 2 TextBoxes. This ASCX page creates 2 properties named 'Address' & 'City' using the Get & Set statements: <script...
0
by: Syoam4ka | last post by:
My project is about jewellery. I have devided my jewelery into main types, which each one of them has sub types, and each one those sub types has the jewellery. I have a tabcontainer. It includes...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
Oralloy
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 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.