I'm a middle tier (dll / MTS / COM+ / Extensions) guy and I'm a bit rusty on
the GUI part of ASP.NET
I have a web form that a user uses to cycle through records in the DB to
review unmatched items and assign / fix them.
I need the WebForm to contain the identity key from the SQL Server table so
the Save button can pass it in a WHERE clause so that the system updates the
correct record, but I don't want the user to SEE this value on the WebForm.
I have tried various combinations of Label / TextBox, Visible=False, and so
forth, and I can't see how to make .NET deliver a <input type=hidden...> to
the browser.
I would REALLY rather not put a Hidden HTML control on the form and have to
do filthy scripting hacks to get the Page_Load to be able to stuff the
primary key of the current record into an HTML control that the server code
can't see.
I also would rather not have to use TextBox Server Controls and then set a
whole bunch of CSS attributes so that border, backcolor and forecolor are
all the same as the background. That's just a dirty kludge to me.
--
Peace & happy computing,
Mike Labosh, MCSD
"When you kill a man, you're a murderer.
Kill many, and you're a conqueror.
Kill them all and you're a god." -- Dave Mustane 3 1812
Page.ClientScript.RegisterHiddenField for ASP.NET 2.0
Page.RegisterHiddenField for ASP.NET 1.1
-Brock
DevelopMentor http://staff.develop.com/ballen I'm a middle tier (dll / MTS / COM+ / Extensions) guy and I'm a bit rusty on the GUI part of ASP.NET
I have a web form that a user uses to cycle through records in the DB to review unmatched items and assign / fix them.
I need the WebForm to contain the identity key from the SQL Server table so the Save button can pass it in a WHERE clause so that the system updates the correct record, but I don't want the user to SEE this value on the WebForm.
I have tried various combinations of Label / TextBox, Visible=False, and so forth, and I can't see how to make .NET deliver a <input type=hidden...> to the browser.
I would REALLY rather not put a Hidden HTML control on the form and have to do filthy scripting hacks to get the Page_Load to be able to stuff the primary key of the current record into an HTML control that the server code can't see.
I also would rather not have to use TextBox Server Controls and then set a whole bunch of CSS attributes so that border, backcolor and forecolor are all the same as the background. That's just a dirty kludge to me.
Mike Labosh, MCSD
"When you kill a man, you're a murderer. Kill many, and you're a conqueror. Kill them all and you're a god." -- Dave Mustane
> Page.ClientScript.RegisterHiddenField for ASP.NET 2.0 Page.RegisterHiddenField for ASP.NET 1.1
Perfect! Thanks!
--
Peace & happy computing,
Mike Labosh, MCSD
"When you kill a man, you're a murderer.
Kill many, and you're a conqueror.
Kill them all and you're a god." -- Dave Mustane
if you dont wish to use the primary key on the client side
then you can store it in the viewstate of the
like in c#
ViewState["Pkey"]=1;
and retrieve it on postback by
(int)ViewState["Pkey"](if it is a int)
this ensures that your primary key is encrypted and is not visible for
scripting purpose
"Mike Labosh" wrote: I'm a middle tier (dll / MTS / COM+ / Extensions) guy and I'm a bit rusty on the GUI part of ASP.NET
I have a web form that a user uses to cycle through records in the DB to review unmatched items and assign / fix them.
I need the WebForm to contain the identity key from the SQL Server table so the Save button can pass it in a WHERE clause so that the system updates the correct record, but I don't want the user to SEE this value on the WebForm.
I have tried various combinations of Label / TextBox, Visible=False, and so forth, and I can't see how to make .NET deliver a <input type=hidden...> to the browser.
I would REALLY rather not put a Hidden HTML control on the form and have to do filthy scripting hacks to get the Page_Load to be able to stuff the primary key of the current record into an HTML control that the server code can't see.
I also would rather not have to use TextBox Server Controls and then set a whole bunch of CSS attributes so that border, backcolor and forecolor are all the same as the background. That's just a dirty kludge to me. -- Peace & happy computing,
Mike Labosh, MCSD
"When you kill a man, you're a murderer. Kill many, and you're a conqueror. Kill them all and you're a god." -- Dave Mustane This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Saqib Ali |
last post by:
I have created a slider using Javascript and html tables that
generally works very well.
As you move the "knob" to the right, a numeric value in an adjactent
<INPUT type="text"> tag increases....
|
by: neverstill |
last post by:
hi-
I need to have an asp:TextBox that will allow me to set the type attribute
to hidden. I can't seem to find a way to do this. Basically, I have a
Wizard application that will show/hide...
|
by: alex |
last post by:
I need to set a directory with hidden and/or system attribute from my
c# code. Similar to what is c:\RECYCLER folder set to in WinXP. So it
is not visible to a user with default "Folder Options". ...
|
by: SAL |
last post by:
I have the following line of code in my Page_Load Event of my ASP.net page:
txtExplanationofChange.Attributes.Add ("style","overflow :hidden");
which allows me to can turn off the Scrollbar of my...
|
by: parag1234567 |
last post by:
Hi,
I am dynamically generating a html file which will contain only <div> tags which contents are hidden from user( set by style="visibility:hidden")
Now the next step is i am enabling some of...
|
by: mark |
last post by:
Forgive me if this seems like a stupid question but I need help...
I'm trying to do a simple online form that emails me the results from
a few fields.
Here is the code:
<form...
|
by: msg2ajay |
last post by:
hi,
i am working on <div> i have to hide some part of the table. I am not able to hide that table part can anybady tell me where is the error.
<html>
<head>
<script...
|
by: dba |
last post by:
Without giving a lot of script at this time, I am having a problem with
php and form input type="hidden". Problem is that the hidden variable
displays last line from database query.
Some code....
|
by: Patient Guy |
last post by:
I have a "hidden" anchor in the body of a doc. By "hidden," I mean that
the contained text of the anchor is indistinguishable from the surrounding
text, the text contained by its parent/ancestor...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
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,...
|
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...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
| |