473,326 Members | 2,255 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,326 software developers and data experts.

retrieving attribute of textbox using page.request

ton
Hi,

I'm using Ajax (AjaxPro) this works fine. (In vb.net)

To get update several controls I connect the server and these controls are
updated.
When saving these values I use aa=page.request("TextboxID") which gives me
the modified Text property

in case of a combobox i get with this method the selectedkey value. Great !!
Now my problem:

I also use in a certain textbox a attribute "key" which is set in my
javascript. I know it is there, but I have no idea how to get it.
I know there is a workaround via using a hidden textfield, but that is not
the solution I want to have.

please help

Thanks
Ton
Aug 19 '08 #1
4 1517
on 19-8-2008, ton supposed :
Hi,

I'm using Ajax (AjaxPro) this works fine. (In vb.net)

To get update several controls I connect the server and these controls are
updated.
When saving these values I use aa=page.request("TextboxID") which gives me
the modified Text property

in case of a combobox i get with this method the selectedkey value. Great !!
Now my problem:

I also use in a certain textbox a attribute "key" which is set in my
javascript. I know it is there, but I have no idea how to get it.
I know there is a workaround via using a hidden textfield, but that is not
the solution I want to have.

please help

Thanks
Ton
That's about the only option you have (unless you want to write to
cookies from javascript).

For the browser an aspx page is just a plain html form. A POST will
only send the values of the various input controls, not any other
attributes that you may have set.

Why don't you want a hidden input?
Hans Kesting
Aug 19 '08 #2
"ton" <to*@nospam.nlwrote in message
news:b6***************************@cache2.tilbu1.n b.home.nl...
When saving these values I use aa=page.request("TextboxID") which gives
me the modified Text property
This is very much ASP Classic syntax. Webcontrols like asp:TextBox are
persisted across a postback via ViewState. You should consider using aa =
TextBoxID.Text instead...
I know there is a workaround via using a hidden textfield, but that is not
the solution I want to have.
Why not? Hidden fields were created precisely for this sort of
functionality...
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Aug 19 '08 #3
ton
ok I'm convinced
"Mark Rae [MVP]" <ma**@markNOSPAMrae.netschreef in bericht
news:Ov**************@TK2MSFTNGP03.phx.gbl...
"ton" <to*@nospam.nlwrote in message
news:b6***************************@cache2.tilbu1.n b.home.nl...
>When saving these values I use aa=page.request("TextboxID") which gives
me the modified Text property

This is very much ASP Classic syntax. Webcontrols like asp:TextBox are
persisted across a postback via ViewState. You should consider using aa =
TextBoxID.Text instead...
>I know there is a workaround via using a hidden textfield, but that is
not the solution I want to have.

Why not? Hidden fields were created precisely for this sort of
functionality...
--
Mark Rae
ASP.NET MVP
http://www.markrae.net
Aug 20 '08 #4
ton
ok I'm convinced
"Hans Kesting" <ne*********@spamgourmet.comschreef in bericht
news:%2****************@TK2MSFTNGP05.phx.gbl...
on 19-8-2008, ton supposed :
>Hi,

I'm using Ajax (AjaxPro) this works fine. (In vb.net)

To get update several controls I connect the server and these controls
are updated.
When saving these values I use aa=page.request("TextboxID") which gives
me the modified Text property

in case of a combobox i get with this method the selectedkey value. Great
!!
Now my problem:

I also use in a certain textbox a attribute "key" which is set in my
javascript. I know it is there, but I have no idea how to get it.
I know there is a workaround via using a hidden textfield, but that is
not the solution I want to have.

please help

Thanks
Ton

That's about the only option you have (unless you want to write to cookies
from javascript).

For the browser an aspx page is just a plain html form. A POST will only
send the values of the various input controls, not any other attributes
that you may have set.

Why don't you want a hidden input?
Hans Kesting

Aug 20 '08 #5

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

Similar topics

9
by: Sunny | last post by:
Hi, I have cr8ed a javascript function in the head section of a jsp page. <!-- function go(theURL) { alert(theURL); if (theURL!=null){
4
by: Rodrigo DeJuana | last post by:
Howdy, I'm new to this .net stuff and really have little to no training. Im trying to create a new page for a web form, so i have been pretty much jsut coping code. I having some issue with...
7
by: I am Sam | last post by:
I have a DataGrid that is passing information to a stored procedure properly but the parameters aren't being casted properly. I was woundering if anyone can tell me how I should properly cast the...
13
by: RHPT | last post by:
I am wanting to capture the XML posted by an InfoPath form with .NET, but I cannot figure out how to capture the XML stream sent back by the InfoPath form. With Classic ASP, I could just create an...
0
by: fernandezr | last post by:
Hi, I've got a user control that is referenced twice on the same page and I'd like to access the textbox values on postback so I can update a database. How can get the values for each instance of...
7
by: Sirplaya | last post by:
I am retrieving images that I stored in SQL Server on my web pages in C#. I have no problem with the images displaying, however, I am trying to wrap the image with an <A HREF ..." and each time I...
1
by: jimmyfo | last post by:
Hi, I recently wrote an ASP.Net web application in VS2005 and published (using VS2005 Publish feature) it to a relatively clean machine with ASP.Net 2.0 and MDAC 2.8 installed on it. However, when...
5
by: andrewbb | last post by:
This will likely be the dumbest question of the day, but: Me.Request.Form.Item(3) 'works Me.Request.Form.Item("txtName") 'doesn't work Intellisense shows the full name of the key is:...
0
bmallett
by: bmallett | last post by:
First off, i would like to thank everyone for any and all help with this. That being said, I am having a problem retrieving/posting my dynamic form data. I have a form that has multiple options...
0
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...
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
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
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.