473,466 Members | 1,457 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Accessing original (html tag) value of a control property

Suppose I have a datagrid control which defines the showfooter property

<dg:datagridconfirm id="dg_inbox" Runat="server" showfooter=false>

During subsequent postbacks of the page, I change the showfooter value to
true or false depending on the number of items in the datagrid

If me.Items.Count = 0 Then
ShowFooter = True
Else
ShowFooter = False
End If

The question is:
Is there any way I can reference the original value that was set in the tag?
(In this case false).

I realize I can set a viewstate variable when page.isPostBack is false, but
it seems to me there should be some way to access the original tag value.
Nov 19 '05 #1
2 1281
"HoustonFreeways" <es*******@NOcomcastSPAM.com> wrote in
news:tY********************@comcast.com:
The question is:
Is there any way I can reference the original value that was set in
the tag? (In this case false).

I realize I can set a viewstate variable when page.isPostBack is
false, but it seems to me there should be some way to access the
original tag value.


That's what viewstate or session variables are for.

--
Lucas Tam (RE********@rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/
Nov 19 '05 #2
If you interogate the control in Page_Init, then that value will be the "default"
value. Page_Init fires prior to any data being restored into the control
from a postback.

-Brock
DevelopMentor
http://staff.develop.com/ballen
Suppose I have a datagrid control which defines the showfooter
property

<dg:datagridconfirm id="dg_inbox" Runat="server" showfooter=false>

During subsequent postbacks of the page, I change the showfooter value
to true or false depending on the number of items in the datagrid

If me.Items.Count = 0 Then
ShowFooter = True
Else
ShowFooter = False
End If
The question is:
Is there any way I can reference the original value that was set in
the tag?
(In this case false).
I realize I can set a viewstate variable when page.isPostBack is
false, but it seems to me there should be some way to access the
original tag value.


Nov 19 '05 #3

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

Similar topics

3
by: Vivek Sharma | last post by:
Hi, I have created a dropdownlist as a web user control. I am using its multiple instances on the webpage. How do I access the selectedValue of each instance? All the instances have different...
1
by: Suhail A, Salman | last post by:
Dear All, I placed a HtmlSelect control on a web page and set it to "Run at Server", the objective of this HtmlSelect control is that the client adds all his accounts to a text box, and...
6
by: darrel | last post by:
I've asked this a few times and gotten answers, but I'm still missing a piece of the puzzle. Here's what I have: - page.aspx - title tag - usercontrol.aspx - usercontrol.aspx.vb
5
by: Dan Nash | last post by:
Hi all, I've got a page with a user control on, added via VS. I'm trying to get to a property of the user control (or more precisely, a public var). Here's the code at the top of my aspx...
9
by: Craig Andrews | last post by:
Hello, How do I access HTML CheckBoxs in the codebehind section of an ASP.NET program? In the old Interdev days one would: For i = 1 to Request.Form("CheckBox").Count if...
6
by: Adrian | last post by:
Hi I'm building an ActiveX replacement in VB.net base info from http://www.vbdotnetheaven.com/Code/Jun2003/2067.asp Anyone know how I can call a JavaScript Function in the hosting webpage from...
5
by: Alex Maghen | last post by:
Hi. If I create a WebControl (User Control, actually), I know how, easily, to access the design-time Properties that have been set as Propertiy nodes in the tag used on the ASPX page. But I've...
3
by: Nathan Sokalski | last post by:
I have a validator that I wrote by inheriting from BaseValidator. At certain points in the code, I need to access other controls on the page containing the validator. I have the IDs of these...
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...
1
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...

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.