473,788 Members | 2,898 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1550
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.nlw rote in message
news:b6******** *************** ****@cache2.til bu1.nb.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**@markNOSPA Mrae.netschreef in bericht
news:Ov******** ******@TK2MSFTN GP03.phx.gbl...
"ton" <to*@nospam.nlw rote in message
news:b6******** *************** ****@cache2.til bu1.nb.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*********@sp amgourmet.comsc hreef in bericht
news:%2******** ********@TK2MSF TNGP05.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
28942
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
2930
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 some textboxes not updating when i a hit save. for example I have this code in my aspx.cs file: declared:
7
2141
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 following: (TextBox)UserPrefix=(TextBox)e.Item.Cells.Controls; string strUserPrefix=UserPrefix.Text; I keep getting the following error and I don't know why because I have declared the UserPrefix as a textbox using "protected...
13
3959
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 MSXML object then load the XML with a simple objXML.Load(Request). This would give me the XML stream, which I could then manipulate. However, using System.Xml, this is not possible - not that I have found, anyway. The InfoPath documentation...
0
1348
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 the user control text box? Here is the user control ascx file: <%@ Control Language="C#" EnableViewState="true" AutoEventWireup="true" CodeFile="ucAddress.ascx.cs" Inherits="ucAddress" %>
7
2060
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 try, it acts like the link is not even on the image. What is the proper way to do this? Thanks.
1
9449
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 I try to create my SQL connection in the code-behind, I get the following error. I tried to register the DLL using regsvr32 but that errored out saying, "dllregisterserver entry point was not found". Any ideas? Retrieving the COM class factory...
5
1923
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: ctl00$ContentPlaceHolder1$txtName Why is the key not: txtName ?
0
3396
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 within options. I have everything being dynamically named from the previously dynamically named element. (I hope this makes sense.) I am not able to retrieve any of the dynamically created values. I can view them on the source page but can't pull them...
0
9656
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9498
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10364
Oralloy
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10110
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8993
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7517
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5536
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4069
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3670
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.