Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Datagrid Control > Pass value of hidden fields in Gridview to SQL parameter

Reply
Thread Tools

Pass value of hidden fields in Gridview to SQL parameter

 
 
Hennie
Guest
Posts: n/a
 
      06-20-2006
How can I pass the value of a hidden field to the Parameter?

Thanks


 
Reply With Quote
 
 
 
 
Eliyahu Goldin
Guest
Posts: n/a
 
      06-20-2006
What exactly is the problem?

Eliyahu

"Hennie" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> How can I pass the value of a hidden field to the Parameter?
>
> Thanks
>



 
Reply With Quote
 
 
 
 
Hennie
Guest
Posts: n/a
 
      06-20-2006
I have a field (column) in a gridview with visible set as false.
I need the value of the field to be passed to a parameter in a stored
procedure to update the database.

When a field is hidden (visible=false) the value of the field is no longer
accesable. Is there a work around?


"Eliyahu Goldin" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> What exactly is the problem?
>
> Eliyahu
>
> "Hennie" <(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
>> How can I pass the value of a hidden field to the Parameter?
>>
>> Thanks
>>

>
>



 
Reply With Quote
 
Eliyahu Goldin
Guest
Posts: n/a
 
      06-21-2006
Columns with Visible=false don't render to the client and, naturally, don't
come back to server with postbacks. A work around is to hide the column with
css rule display:none while keeping Visible=true.

Eliyahu

"Hennie" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>I have a field (column) in a gridview with visible set as false.
> I need the value of the field to be passed to a parameter in a stored
> procedure to update the database.
>
> When a field is hidden (visible=false) the value of the field is no longer
> accesable. Is there a work around?
>
>
> "Eliyahu Goldin" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> What exactly is the problem?
>>
>> Eliyahu
>>
>> "Hennie" <(E-Mail Removed)> wrote in message
>> news:%(E-Mail Removed)...
>>> How can I pass the value of a hidden field to the Parameter?
>>>
>>> Thanks
>>>

>>
>>

>
>



 
Reply With Quote
 
PeterKellner
Guest
Posts: n/a
 
      06-29-2006
On Tue, 20 Jun 2006 22:03:21 +0200, "Hennie" <(E-Mail Removed)>
wrote:

>I have a field (column) in a gridview with visible set as false.
>I need the value of the field to be passed to a parameter in a stored
>procedure to update the database.
>
>When a field is hidden (visible=false) the value of the field is no longer
>accesable. Is there a work around?
>
>
>"Eliyahu Goldin" <(E-Mail Removed)> wrote in message
>news:(E-Mail Removed)...
>> What exactly is the problem?
>>
>> Eliyahu
>>
>> "Hennie" <(E-Mail Removed)> wrote in message
>> news:%(E-Mail Removed)...
>>> How can I pass the value of a hidden field to the Parameter?
>>>
>>> Thanks
>>>

>>
>>

>


You could also set the gridview attribute
datakeynames=[id,myhiddenfieldid]

and that will let you store in viewstate the value.
Peter Kellner
http://peterkellner.net
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Populate Hidden field on post back and retrieve value from Hidden Field Rick ASP .Net 3 04-13-2010 05:38 PM
[STRUTS] multi-value fields in <html:hidden> Hole Java 0 10-10-2006 02:10 PM
is it possible to get hidden parameter values using window.opener.document.form.parameter.value. Abdul Mohsin Javascript 1 09-06-2005 03:38 PM
how to pass an array of data with hidden fields or cookies? Fred ASP General 4 10-26-2004 05:10 PM
Netscape hidden fields - array - multiple fields with same name mark.reichman@rl.af.mil Javascript 0 07-17-2003 03:05 PM



Advertisments