473,651 Members | 2,645 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

RegisterHiddenF ield and trace

Hi.

I am creating a custom control that uses the RegisterHiddenF ield method to
insert a hidden field on a page. When I tried to see the value of the hidden
field on a trace, I noticed that it does not appear on the Control Tree
section of the trace. I put a normal hidden field on an aspx page and set it
to run as a server control, and the control appears at the trace info. I
have two questions about this:

1) Only server controls can appear at the trace page? Is it possible to make
regular html controls appear at the trace page?
2) Can the RegisterHiddenF ield method creates a server hidden field, in
order to make it appears at the trace page?

Also, I tried to inspect the value of the hidden field using Request.Params
in the OnInit event of my custom control. It always returns me "", though I
change the value of the field in Javascript. How can I read the value of the
hidden field correctly in my custom control?

TIA,
Erik Cruz
Nov 17 '05 #1
4 1790
> 1) Only server controls can appear at the trace page? Is it possible to
make
regular html controls appear at the trace page?
RegisterHiddenF ield doesn't create a Control. It adds HTML to the page that
renders a hidden form field on the client.
2) Can the RegisterHiddenF ield method creates a server hidden field, in
order to make it appears at the trace page?
No. The server side is unawarae of any non-Control HTML in the page.
How can I read the value of the
hidden field correctly in my custom control?
Request.Form("h iddenFormFieldN ame")

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
http://www.takempis.com
Big Things are made up of
Lots of Little Things.

"Erik Cruz" <er************ ******@antares. com.br> wrote in message
news:OS******** ******@TK2MSFTN GP12.phx.gbl... Hi.

I am creating a custom control that uses the RegisterHiddenF ield method to
insert a hidden field on a page. When I tried to see the value of the hidden field on a trace, I noticed that it does not appear on the Control Tree
section of the trace. I put a normal hidden field on an aspx page and set it to run as a server control, and the control appears at the trace info. I
have two questions about this:

1) Only server controls can appear at the trace page? Is it possible to make regular html controls appear at the trace page?
2) Can the RegisterHiddenF ield method creates a server hidden field, in
order to make it appears at the trace page?

Also, I tried to inspect the value of the hidden field using Request.Params in the OnInit event of my custom control. It always returns me "", though I change the value of the field in Javascript. How can I read the value of the hidden field correctly in my custom control?

TIA,
Erik Cruz

Nov 17 '05 #2
> 1) Only server controls can appear at the trace page? Is it possible to
make
regular html controls appear at the trace page?
RegisterHiddenF ield doesn't create a Control. It adds HTML to the page that
renders a hidden form field on the client.
2) Can the RegisterHiddenF ield method creates a server hidden field, in
order to make it appears at the trace page?
No. The server side is unawarae of any non-Control HTML in the page.
How can I read the value of the
hidden field correctly in my custom control?
Request.Form("h iddenFormFieldN ame")

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
http://www.takempis.com
Big Things are made up of
Lots of Little Things.

"Erik Cruz" <er************ ******@antares. com.br> wrote in message
news:OS******** ******@TK2MSFTN GP12.phx.gbl... Hi.

I am creating a custom control that uses the RegisterHiddenF ield method to
insert a hidden field on a page. When I tried to see the value of the hidden field on a trace, I noticed that it does not appear on the Control Tree
section of the trace. I put a normal hidden field on an aspx page and set it to run as a server control, and the control appears at the trace info. I
have two questions about this:

1) Only server controls can appear at the trace page? Is it possible to make regular html controls appear at the trace page?
2) Can the RegisterHiddenF ield method creates a server hidden field, in
order to make it appears at the trace page?

Also, I tried to inspect the value of the hidden field using Request.Params in the OnInit event of my custom control. It always returns me "", though I change the value of the field in Javascript. How can I read the value of the hidden field correctly in my custom control?

TIA,
Erik Cruz

Nov 17 '05 #3
Hi Kevin.

I could successfuly read the contents of the hidden field using the OnInit
event of my custom control when clicking a button for example. But if I
'refresh' the page I loose the value. What is the difference between
refreshing a page and clicking a button? Aren't they both a submit?

TIA,
Erik Cruz

"Kevin Spencer" <ke***@DIESPAMM ERSDIEtakempis. com> wrote in message
news:eD******** ******@tk2msftn gp13.phx.gbl...
1) Only server controls can appear at the trace page? Is it possible to make
regular html controls appear at the trace page?


RegisterHiddenF ield doesn't create a Control. It adds HTML to the page

that renders a hidden form field on the client.
2) Can the RegisterHiddenF ield method creates a server hidden field, in
order to make it appears at the trace page?
No. The server side is unawarae of any non-Control HTML in the page.
How can I read the value of the
hidden field correctly in my custom control?


Request.Form("h iddenFormFieldN ame")

--
HTH,

Kevin Spencer
Microsoft MVP
.Net Developer
http://www.takempis.com
Big Things are made up of
Lots of Little Things.

"Erik Cruz" <er************ ******@antares. com.br> wrote in message
news:OS******** ******@TK2MSFTN GP12.phx.gbl...
Hi.

I am creating a custom control that uses the RegisterHiddenF ield method to insert a hidden field on a page. When I tried to see the value of the

hidden
field on a trace, I noticed that it does not appear on the Control Tree
section of the trace. I put a normal hidden field on an aspx page and

set it
to run as a server control, and the control appears at the trace info. I
have two questions about this:

1) Only server controls can appear at the trace page? Is it possible to make
regular html controls appear at the trace page?
2) Can the RegisterHiddenF ield method creates a server hidden field, in
order to make it appears at the trace page?

Also, I tried to inspect the value of the hidden field using

Request.Params
in the OnInit event of my custom control. It always returns me "",

though I
change the value of the field in Javascript. How can I read the value of

the
hidden field correctly in my custom control?

TIA,
Erik Cruz


Nov 17 '05 #4
Hi Kevin.

I could successfuly read the contents of the hidden field using the OnInit
event of my custom control when clicking a button for example. But if I
'refresh' the page I loose the value. What is the difference between
refreshing a page and clicking a button? Aren't they both a submit?

TIA,
Erik Cruz

"Kevin Spencer" <ke***@DIESPAMM ERSDIEtakempis. com> wrote in message
news:eD******** ******@tk2msftn gp13.phx.gbl...
1) Only server controls can appear at the trace page? Is it possible to make
regular html controls appear at the trace page?


RegisterHiddenF ield doesn't create a Control. It adds HTML to the page

that renders a hidden form field on the client.
2) Can the RegisterHiddenF ield method creates a server hidden field, in
order to make it appears at the trace page?
No. The server side is unawarae of any non-Control HTML in the page.
How can I read the value of the
hidden field correctly in my custom control?


Request.Form("h iddenFormFieldN ame")

--
HTH,

Kevin Spencer
Microsoft MVP
.Net Developer
http://www.takempis.com
Big Things are made up of
Lots of Little Things.

"Erik Cruz" <er************ ******@antares. com.br> wrote in message
news:OS******** ******@TK2MSFTN GP12.phx.gbl...
Hi.

I am creating a custom control that uses the RegisterHiddenF ield method to insert a hidden field on a page. When I tried to see the value of the

hidden
field on a trace, I noticed that it does not appear on the Control Tree
section of the trace. I put a normal hidden field on an aspx page and

set it
to run as a server control, and the control appears at the trace info. I
have two questions about this:

1) Only server controls can appear at the trace page? Is it possible to make
regular html controls appear at the trace page?
2) Can the RegisterHiddenF ield method creates a server hidden field, in
order to make it appears at the trace page?

Also, I tried to inspect the value of the hidden field using

Request.Params
in the OnInit event of my custom control. It always returns me "",

though I
change the value of the field in Javascript. How can I read the value of

the
hidden field correctly in my custom control?

TIA,
Erik Cruz


Nov 17 '05 #5

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

Similar topics

1
3085
by: Matthew Wieder | last post by:
Hi - I wanted to capture the enter button on a form since I have a datagrid with the first column being a delete button and if someone hits enter it deletes the first record. I coded: private void Page_Load(object sender, System.EventArgs e) { Page.RegisterHiddenField("__EVENTTARGET","SomeButtonOnThePage");
1
2509
by: MeDhanush | last post by:
Can sb pl tell me When & how do you use i) RegisterHiddenField() ii) Hidden field EVENTTARGET iii) Hidden fieldEVENTARGUMENT I noticed ii) and iii) in the form. Any docs pointing to this info
0
859
by: Erik Cruz | last post by:
Hi. I am creating a custom control that uses the RegisterHiddenField method to insert a hidden field on a page. When I tried to see the value of the hidden field on a trace, I noticed that it does not appear on the Control Tree section of the trace. I put a normal hidden field on an aspx page and set it to run as a server control, and the control appears at the trace info. I have two questions about this: 1) Only server controls can...
0
1460
by: Francis | last post by:
Hi all, I am writing a .cs component that sets RegisterHiddenField on the server side and generates javascript to execute on the client side. It works when the component is directly in the page, but not when it is inside an ascx. In the source code of the page, I can see that the ascx adds an prefix before the ID of the hidden field. This kind of thing is no problem when you are using javascript on objects such as buttons, that have a...
0
1112
by: Cliff Harris | last post by:
In the Page_Load Event on the page, I register a hidden field using RegisterHiddenField("myvar", "my value"); Later, in a button event, I want to change the value of that hidden field that was registered. However, it seems that once I register it for the first time, I can't change that value. Anyone know how I can do this? -Cliff
0
2687
by: Dave | last post by:
Are there any known restrictions on where Page.RegisterHiddenField will work? It seems to only work in the Page_Load event...My code below fails to render it in the page's source I would like these values to be used by some client-side javascript. If I can't use the register methods here, how can I make the data grid's clicked values availble in the Page_Load's Postback? Thanks, Dave private void dgGrid_ItemCommand(Object src,...
1
2424
by: Pete Mahoney | last post by:
I have a datagrid with a button column that displays some partner info. i.e. PartnerId, PartnerName ... The button column has a button that when the user clicks it they are redirected or server.transfer to a different page where I would like to pass the PartnerId. I could do this very easy with a QueryString, but would rather not display this info in the URL. I want to pass this by creating a form variable using the...
2
5365
by: ashish | last post by:
If i want to add a hidden field on the page, how can i check whether that hidden field exists ? for example if i do If Page.FindControl("myhiddenfield") Is Nothing Then Page.RegisterHiddenField("myhiddenfield", "hidden") End If
3
1571
by: John Smith | last post by:
I am having a brain fart today.... How do you set a default button within a User Control? I am using "Page.RegisterHiddenField("__EVENTTARGET", "btnSubmit")" but it does not seem to be working for me. I have another User Control which uses this technique and works. Can't think of what I am missing? --
0
8347
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8275
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8694
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8457
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
5605
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4143
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4280
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1905
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1585
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.