473,320 Members | 2,111 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Possible to pass parameters from web user control client-side to server

How can data be passed to the server when an event is fired in client-side
jscript, ie on a drop event?
I have tried using hidden fields and submitting the page, but for some
reason I can't access a html hidden field that is set to run as server
control.
Please can someone point me in the right direction here?

/Henke
Nov 18 '05 #1
3 1880
Not sure if this will help...

If you have set the HTML control as hidden
via .Visible=false then .Net won't load its new value on
postback.

Try hiding the control via its style property instead and
it should be populated with the new value on postback.

-----Original Message-----
How can data be passed to the server when an event is fired in client-sidejscript, ie on a drop event?
I have tried using hidden fields and submitting the page, but for somereason I can't access a html hidden field that is set to run as servercontrol.
Please can someone point me in the right direction here?

/Henke
.

Nov 18 '05 #2
Thanks for your answer, but the problem is that when I try to access the
<INPUT> that should be populated with the new value I get:
....document.forms[0].hidden is null or not an object... It seems that when I
set it run as a server object it can't be access on the client side. This
happens only if the control is used on a WebUserControl not on a WebForm.
/Henke

"anon" <an*******@discussions.microsoft.com> skrev i meddelandet
news:0b****************************@phx.gbl...
Not sure if this will help...

If you have set the HTML control as hidden
via .Visible=false then .Net won't load its new value on
postback.

Try hiding the control via its style property instead and
it should be populated with the new value on postback.

-----Original Message-----
How can data be passed to the server when an event is

fired in client-side
jscript, ie on a drop event?
I have tried using hidden fields and submitting the page,

but for some
reason I can't access a html hidden field that is set to

run as server
control.
Please can someone point me in the right direction here?

/Henke
.

Nov 18 '05 #3
If you just want to pass the value to the client script
take a look at

Page.RegisterHiddenField

If you need the field to be posted back too then use the
style attribute to hide the control.

D
-----Original Message-----
Thanks for your answer, but the problem is that when I try to access the<INPUT> that should be populated with the new value I get:
....document.forms[0].hidden is null or not an object... It seems that when Iset it run as a server object it can't be access on the client side. Thishappens only if the control is used on a WebUserControl not on a WebForm./Henke

"anon" <an*******@discussions.microsoft.com> skrev i meddelandetnews:0b****************************@phx.gbl...
Not sure if this will help...

If you have set the HTML control as hidden
via .Visible=false then .Net won't load its new value on
postback.

Try hiding the control via its style property instead and it should be populated with the new value on postback.

>-----Original Message-----
>How can data be passed to the server when an event is

fired in client-side
>jscript, ie on a drop event?
>I have tried using hidden fields and submitting the page,
but for some
>reason I can't access a html hidden field that is set
to run as server
>control.
>Please can someone point me in the right direction

here? >
>/Henke
>
>
>.
>

.

Nov 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Jill Graham | last post by:
Hi folks, I'm calling some custom made user controls from within my .aspx web page using newControl = Page.LoadControl("myControl.ascx") Page.Controls.Add(newControl) My control has two...
6
by: allyn44 | last post by:
HI--what I am trying to do is 2 things: 1. Open a form in either data entry mode or edit mode depending on what task the user is performing 2. Cancel events tied to fields on the form if I am in...
5
by: Ben | last post by:
Hi I am using a User Control which is referenced by an ASPX page. How can I pass a string parameter to the user control, from the base ASPX page. Thanks Ben
4
by: David Freeman | last post by:
Hi There! I'm just wondering if there's a way to pass parameters (as if you were passing parameters to a ASCX web control) when calling an ASPX page? e.g. MyDetailsPage.UserName = "david" ...
2
by: craigkenisston | last post by:
Hi, I have a web user control that displays "items" by user, by category, newest "items", etc. It works very well and does what I want, this is done with parameters in the page that holds the...
2
by: Aeryn | last post by:
I have a VB.NET application that is almost ready to deploy. Normally this application is just launched and the user interacts through the application's forms. However, I want to be able to add it to...
3
by: Wang Xiaoning | last post by:
I have an customerdetail.xsl sheet ---------------------------------------------------------- <?xml version="1.0" encoding="iso-8859-1"?> <xsl:stylesheet version="1.0"...
0
by: hcuellar | last post by:
Hi. Please I need your help for this: After a database query, a table is created with a cell for each information retrieved, and for each record, two buttons, and second one have besides it...
12
by: raylopez99 | last post by:
Keywords: scope resolution, passing classes between parent and child forms, parameter constructor method, normal constructor, default constructor, forward reference, sharing classes between forms....
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.