ToolBox HTML Control HTMLHidden

HTML Hidden Web Server Control

In ASP.NET environment,This article describes you how to work with HTML Hidden Control.In HTML environment, Hidden is an object that represents a Hidden control in an HTML form. The Hidden control in a HTML form contains all instance of an <input type="hidden"> tag.

The HtmlInputHidden control can be used to comprised information that is concealed from the user that means user unable to view the information. This information is sent when the Web page is posted back to the server.

There are several functions available to access the HTML Hidden.some of its funtions are as follows,

  • document.getElementById()
  • document.getElementByName()
Hidden Objects Properties
  • id -Sets or returns the id of a Hidden
  • form -Returns a reference to the form that contains the Hidden
  • alt -Sets or returns an alternate text to display if a browser does not support Hiddens
  • name -Sets or returns the name of a Hidden
  • type -Returns the type of form element a Hidden is
  • value -Sets or returns the text that is displayed on the Hidden
  • title -Sets or returns an element's advisory title
  • lang -Sets or returns the language code for an element
  • dir -Sets or returns the direction of text
  • className -Sets or returns the class attribute of an element
Hidden Objects Methods
  • blur() -Performs focus when leave from the control
  • click() -Simulates a mouse-click on a Hidden
  • focus() -Performs focus when enter into the control

The following code snippets explains you the HTML Hidden in the web form.

in .aspx.cs page,

void Page_Load(object sender, EventArgs e) 
      {

         if (Page.IsPostBack) 
         {
            Span1.InnerHtml="Hidden value: " + hid1.Value + "";
         }
      }

      void SubmitBtn_Click(object sender, EventArgs e) 
      {
         hid1.Value=StringContents.Value;
      }
        

in .aspx page,

 <form id="Form2" runat=server>
      <h3>HtmlInputHidden Sample</h3>
      <input id="hid1" 
             type=hidden 
             value="Initial Value" 
             runat=server>      
      <input id="StringContents" 
             type=text 
             size=40 
             runat=server>
      <p>
      <input id="Submit1" type=submit 
             value="Enter" 
             OnServerClick="SubmitBtn_Click" 
             runat=server>
      <p>
   </form>
 
Related Links

Posted by: Admin
Posted on: 9/18/2009 at 4:51 PM
Tags: , ,
Categories: Asp.net
Actions: E-mail | Kick it! | DZone it! | del.icio.us
Post Information: Permalink | Comments (20) | Post RSSRSS comment feed

Comments

Onlineatoz.net

Friday, September 18, 2009 4:52 PM

trackback

ToolBox HTML Control HTMLImage

ToolBox HTML Control HTMLImage

cash loans United States

Friday, October 30, 2009 8:33 PM

cash loans

Interesting ... as always - is your blog making any cash advance ? ;)

payday loans United States

Saturday, November 14, 2009 5:17 PM

payday loans

I always wanted to write in my site something like that but I guess you'r faster Smile

payday loans United States

Saturday, January 02, 2010 10:58 AM

payday loans

Do you have any more info on this?

Alabama Payday Loans United States

Monday, January 04, 2010 3:37 PM

Alabama Payday Loans

I always wanted to write in my site something like that but I guess you'r faster Smile

internet payday loan United States

Friday, March 26, 2010 8:04 AM

internet payday loan

I don’t usually reply to posts but I will in this case. WoW Smile

get a cash advance United States

Saturday, March 27, 2010 7:48 AM

get a cash advance

Hey I love your style I will subscribe for your feed please keep posting!

quick unsecured loans United States

Monday, March 29, 2010 11:06 PM

quick unsecured loans

Very interesting post - Might be old news, but it was news to me.

legit bad credit loans United States

Tuesday, March 30, 2010 8:55 AM

legit bad credit loans

I just hope to have understood this the way it was meant

stretch marks from losing weight United States

Thursday, April 01, 2010 10:23 PM

stretch marks from losing weight

I keep listening to the news talk about getting free online grant applications so I have been searching around for the best site to get one.

quick personal loan United States

Friday, April 30, 2010 5:13 AM

quick personal loan

There are certainly a lot of details like that to take into consideration.

quick and loans arena United States

Monday, May 24, 2010 11:59 PM

quick and loans arena

I wanted to say that it's nice to know that someone else also mentioned this as I had trouble finding the same info elsewhere. This was the first place that told me the answer. Thanks.

atx power supplies United States

Wednesday, May 26, 2010 11:42 AM

atx power supplies

Great info.I like all your post.I will keep visiting this blog very often.It is good

to see you verbalise from the heart and your clarity on this important subject can be

easily observed. Thanks again!

Eveonline isk United States

Wednesday, May 26, 2010 11:44 AM

Eveonline isk

Pretty good post. I just stumbled upon your blog and wanted to say that I have really enjoyed reading your blog posts. Any way I'll be subscribing to your feed and I hope you post again soon.

no credit check personal loans United States

Thursday, June 10, 2010 8:35 PM

no credit check personal loans

You have all the reason in the world to achieve your grandest dreams.

ugg boots People's Republic of China

Saturday, June 26, 2010 4:05 AM

ugg boots

Well , the view of the passage is totally correct ,your details is really  reasonable and  you <a href=" http://www.discountbootsonsale.co.uk/
" >wslmart.net </a> guy give us  valuable  informative post, I totally agree the standpoint of upstairs. I often surfing on this forum when I m free and I find there are so much good information we can learn in this forum!

speed breaker People's Republic of China

Tuesday, June 29, 2010 8:48 AM

speed breaker

I found a lot of great points in this post, nice

prom dresses People's Republic of China

Tuesday, June 29, 2010 8:48 AM

prom dresses

It’s hard to find knowledgeable people on this topic, but you sound like you know what you’re talking about! Thanks

nfl jersey People's Republic of China

Thursday, July 01, 2010 3:07 AM

nfl jersey

Thanks for the info!!

Add comment




  Country flag

biuquote
  • Comment
  • Preview
Loading