473,503 Members | 12,136 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

clear the hiddenfield value

10 New Member
hi,

how to clear Request.Form["hiddenfield"] valu while refresh the page...

thanks
krish
Nov 14 '07 #1
5 5451
gopalpandey
2 New Member
hi krish,
i think this will work for you.....
This will be written in page_load event......

request.form("hiddenfield").empty

please reply me if this doesn't work...

bye
Nov 14 '07 #2
krishnagovindaraj
10 New Member
Hi,
request.form("hiddenfield").empty doesnt work.plz give another solution....
bye

hi krish,
i think this will work for you.....
This will be written in page_load event......

request.form("hiddenfield").empty

please reply me if this doesn't work...

bye
Nov 14 '07 #3
Frinavale
9,735 Recognized Expert Moderator Expert
hi,

how to clear Request.Form["hiddenfield"] valu while refresh the page...

thanks
krish
Could you please provide more information.
Are you trying to clear the hidden value when the user hits the Refresh button?
If so why? Don't you need to use that hidden field for your server side code?

Could you just provide more information on what your trying to do so that we can help you better.

Thanks

-Frinny
Nov 14 '07 #4
krishnagovindaraj
10 New Member
Hi,
Yes.I have to clear the hidden field value while refresh the page...


page load()
{
if (Request.Form["hidmode"] == "1") // insert
{
insertrecord();
strhidmode="0";
}

}

in aspx:

<input type="hidden" name="hidmode" value="<%=strhidmode%>"/>


after completeing the insert,when i refresh the page the same record is inserted.i could not clear the server hidmode value.
plz give me the solution...


thanks
krish
Nov 15 '07 #5
Frinavale
9,735 Recognized Expert Moderator Expert
Hi,
Yes.I have to clear the hidden field value while refresh the page...


page load()
{
if (Request.Form["hidmode"] == "1") // insert
{
insertrecord();
strhidmode="0";
}

}

in aspx:

<input type="hidden" name="hidmode" value="<%=strhidmode%>"/>


after completeing the insert,when i refresh the page the same record is inserted.i could not clear the server hidmode value.
plz give me the solution...


thanks
krish
I understand now.
Instead of using <input type="hidden"...> in your ASP code, take a look at using the Page.ClientScript.RegisterHiddenField() method instead.
This will let you register a hidden field into the page and let you set it's value.
Nov 15 '07 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

9
4657
by: Kevin Blount | last post by:
Here's the code I tried, and found it failed... <form runat="server" method="post" name="CreditCardForm" id="CreditCardForm"> <% foreach (object item in Request.Form) { if...
3
1955
by: sklett | last post by:
I've added a HiddenField control to my page and some javascript to show it's value in an alert box when a button is pressed. The value that is displayed in the alert box is correct, but when I...
3
6841
by: Jeff | last post by:
Hey ASP.NET 2.0 Below you see the code I'm having problem with. In the Open_Message event/method I want to get the value of the HiddenField at the row in the repeater control I clicked.... my...
1
1480
by: Milkstr | last post by:
I have a repeating region with a hiddenfield on each line, i want to start a counter in my reapeating reagion so that the hiddenfield becomes unique on each line. So that is the reapeating region goe...
1
3430
by: RSH | last post by:
I have a situation where I have a user control (Called TopOrangeMenu) that has an Hidden HTML Field called "txtU" I am trying to get at the value of that hidden field control from within the...
5
2388
by: hharry | last post by:
Hello All, I am trying to make use the HiddenField server control to make a server-side variable visible to a client script. I set the value of the HiddenField inside of the Page_Load event. ...
1
2030
by: KBTibbs | last post by:
My ASP.NET page generates some HTML, then sticks it into a hiddenfield so a javascript can access it and write it to a popup window. I had to disable validation for this page, as HTML inside a...
1
4533
by: win | last post by:
I've created a formview and bind the columns. The column ModifyUser should not be be displayed so that I've modified from Textbos to HiddenField. How can I change the bind value of a Hiddenfield...
7
11489
by: imbirek8 | last post by:
Hi! I would like to write something in Javascript to HiddenField: <asp:HiddenField ID="hiddenMy" runat="server" Value="" /> And in the code behind read this value. But this HiddenField is in...
0
7212
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
7098
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
7364
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...
0
7470
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5026
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
4696
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
3174
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
751
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
405
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...

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.