RegisterHiddenField and trace

Discussion in 'ASP .Net' started by Kevin Spencer, Oct 21, 2003.

  1. > 1) Only server controls can appear at the trace page? Is it possible to
    make
    > regular html controls appear at the trace page?


    RegisterHiddenField doesn't create a Control. It adds HTML to the page that
    renders a hidden form field on the client.

    > 2) Can the RegisterHiddenField 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("hiddenFormFieldName")

    --
    HTH,

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

    "Erik Cruz" <> wrote in message
    news:...
    > 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 appear at the trace page? Is it possible to

    make
    > regular html controls appear at the trace page?
    > 2) Can the RegisterHiddenField 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
    >
    >
    Kevin Spencer, Oct 21, 2003
    #1
    1. Advertising

  2. Kevin Spencer

    Erik Cruz Guest

    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" <> wrote in message
    news:eDypt2$...
    > > 1) Only server controls can appear at the trace page? Is it possible to

    > make
    > > regular html controls appear at the trace page?

    >
    > RegisterHiddenField doesn't create a Control. It adds HTML to the page

    that
    > renders a hidden form field on the client.
    >
    > > 2) Can the RegisterHiddenField 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("hiddenFormFieldName")
    >
    > --
    > HTH,
    >
    > Kevin Spencer
    > Microsoft MVP
    > .Net Developer
    > http://www.takempis.com
    > Big Things are made up of
    > Lots of Little Things.
    >
    > "Erik Cruz" <> wrote in message
    > news:...
    > > 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 appear at the trace page? Is it possible to

    > make
    > > regular html controls appear at the trace page?
    > > 2) Can the RegisterHiddenField 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
    > >
    > >

    >
    >
    Erik Cruz, Oct 22, 2003
    #2
    1. Advertising

  3. Kevin Spencer

    Erik Cruz Guest

    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 appear at the trace page? Is it possible to make
    regular html controls appear at the trace page?
    2) Can the RegisterHiddenField 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
    Erik Cruz, Oct 22, 2003
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Matthew Wieder
    Replies:
    1
    Views:
    374
    Yan-Hong Huang[MSFT]
    Jul 22, 2003
  2. MeDhanush
    Replies:
    1
    Views:
    911
    Natty Gur
    Aug 28, 2003
  3. Francis
    Replies:
    0
    Views:
    671
    Francis
    Nov 3, 2003
  4. Cliff Harris

    Re-RegisterHiddenField

    Cliff Harris, Nov 5, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    396
    Cliff Harris
    Nov 5, 2003
  5. =?Utf-8?B?RGF2ZQ==?=

    Page.RegisterHiddenField does not work!

    =?Utf-8?B?RGF2ZQ==?=, Jun 2, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    654
    =?Utf-8?B?RGF2ZQ==?=
    Jun 2, 2004
Loading...

Share This Page