I am posting from a HTML form (below) to a aspx webform.
This works OK but I notice the £ character (pound sign) is dropped! i.e. not
picked up by a Request.Form["X"] in the webform e.g. input = 12£34, output =
1234
Please would anyone say why this is?
<body>
<form name="Form1" method="post" action="WebForm 3.aspx" id="Form1">
<input name="X" type="text" id="X">
<input type="submit" name="Button1" value="TheButto n" id="Button1" >
</form>
</body> 3 1465
Have you tried setting it to use unicode?
Here's more info on the subject: http://msdn.microsoft.com/library/de...gbasetypes.asp
Also, have you checked the Globalization section of the web.config?
Try changing it to something more like this:
<!-- Web.Config Configuration File -->
<configuratio n>
<system.web>
<customErrors mode="Off"/>
<globalizatio n
fileEncoding="i so-8859-1"
requestEncoding ="iso-8859-1"
responseEncodin g="iso-8859-1"
/>
</system.web>
</configuration>
--
I hope this helps,
Steve C. Orr, MCSD http://SteveOrr.net
"ChainsawDu de" <an******@nospa m.com> wrote in message
news:FB******** *************** ***********@mic rosoft.com... I am posting from a HTML form (below) to a aspx webform. This works OK but I notice the £ character (pound sign) is dropped! i.e. not picked up by a Request.Form["X"] in the webform e.g. input = 12£34, output = 1234
Please would anyone say why this is?
<body> <form name="Form1" method="post" action="WebForm 3.aspx" id="Form1"> <input name="X" type="text" id="X"> <input type="submit" name="Button1" value="TheButto n" id="Button1" > </form> </body>
Steve C. Orr [MVP, MCSD] wrote: Have you tried setting it to use unicode? Here's more info on the subject: http://msdn.microsoft.com/library/de...ry/en-us/cpgui de/html/cpconencodingba setypes.asp
Also, have you checked the Globalization section of the web.config? Try changing it to something more like this:
<!-- Web.Config Configuration File -->
<configuratio n> <system.web> <customErrors mode="Off"/> <globalizatio n fileEncoding="i so-8859-1" requestEncoding ="iso-8859-1" responseEncodin g="iso-8859-1" /> </system.web> </configuration>
ISO-8859-1 is *not* Unicode.
The problem is that the HTML page uses its own encoding to submit the
data, which unless specified is ISO-8859-1. So either change the
globalization element (this can also be done by code BTW), or encode
the HTML page properly, i.e. save it with UTF-8 encoding and add a
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
tag to the page.
Note that there's little reason to downgrade requestEncoding and
responseEncodin g from UTF-8 unless every single byte transmitted
counts, or content is solely intended for North American or Western
European users (excluding the French, who forgot to include some
characters in ISO-8859-1 ;->). I recommend encoding the HTML page
instead.
In theory, the form tag's "accept-charset" attribute allows one to
specify the encoding of form data regardless of the page's own encoding
or browsers settings, but this attribute lacks proper browser support.
Cheers,
-- http://www.joergjooss.de
mailto:ne****** **@joergjooss.d e
Marvelous and thank you very much.
"Joerg Jooss" wrote: Steve C. Orr [MVP, MCSD] wrote:
Have you tried setting it to use unicode? Here's more info on the subject: http://msdn.microsoft.com/library/de...ry/en-us/cpgui de/html/cpconencodingba setypes.asp
Also, have you checked the Globalization section of the web.config? Try changing it to something more like this:
<!-- Web.Config Configuration File -->
<configuratio n> <system.web> <customErrors mode="Off"/> <globalizatio n fileEncoding="i so-8859-1" requestEncoding ="iso-8859-1" responseEncodin g="iso-8859-1" /> </system.web> </configuration>
ISO-8859-1 is *not* Unicode.
The problem is that the HTML page uses its own encoding to submit the data, which unless specified is ISO-8859-1. So either change the globalization element (this can also be done by code BTW), or encode the HTML page properly, i.e. save it with UTF-8 encoding and add a <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> tag to the page.
Note that there's little reason to downgrade requestEncoding and responseEncodin g from UTF-8 unless every single byte transmitted counts, or content is solely intended for North American or Western European users (excluding the French, who forgot to include some characters in ISO-8859-1 ;->). I recommend encoding the HTML page instead.
In theory, the form tag's "accept-charset" attribute allows one to specify the encoding of form data regardless of the page's own encoding or browsers settings, but this attribute lacks proper browser support.
Cheers, -- http://www.joergjooss.de mailto:ne****** **@joergjooss.d e This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Magnus |
last post by:
Hi!
This is my problem:
I want to go from page1 to page2,
and to get all the form variables from page1
to page2.
I have turned the viewstate and the sessionstate off,
and i really just want to get these variables the
|
by: dave |
last post by:
I have a webform with many checkboxes on it. I want the
user to be able click on a button and the page be posted
to another webform so that I can capture which checkboxes
were selected.
For all other buttons on the page i want the page to be
reposted back to the same webform.
What is the best method to accomplish the above?
thx
|
by: Rob Meade |
last post by:
Hi all,
Ok - I have a bit of a problem with a login page.
Originally it was written in normal asp - the page displayed the form, the
user entered their details, it posted back to itself, validated them and
then posted on again (using a form) to the relevant applications - sending
with it a session id from SQL server.
What I need to do at the moment is create a second stage to this and in
|
by: Rob Shorney |
last post by:
Hi,
How do I post the data from webform1.asp to webform2.aspx
In classic asp you can use the request.form but when I do this in webform2 I
get nothing.
--
Regards
|
by: John |
last post by:
Hi
A client has provided an html sample page to be used as "template" for an
asp.net enquiry form to maintain their intended look and feel. Info from the
asp.net form is to be emailed on submission of form. I am not sure how to go
from here in transition from an html layout to a page which incorporates
enquiry form elements in asp.net. Do I need to convert the html page into a
web form? How? Something else I should rather do?
Some...
| |
by: Ian.Suttle |
last post by:
I am have been researching this issue to no end, so any help would be
very much appreciated.
I have a page with form tags. Inside of the form tags is a panel that
contains a user control. The form tags are NOT inside of the user
control. Inside that user control are a few panels that contains
different steps of an application (for applying to something). When I
go to step 1 and submit, the asp:validators catch the errors and the...
|
by: Andre Ranieri |
last post by:
I'm trying to create a login page for customers to log into our corporate
website, our presidents naturally wants the user and password fields to
populate from a cookie so the customer doesn't have to type their credentials
every time, this seems like a pretty common thing. However, when I try to
populate the password HTML textbox from the cookie, the textbox remains
blank. However, if I try this from an equivalent web control, the...
|
by: jlopes151 |
last post by:
Question:
I'm creating an ASP.NET webform and I have questions about how the
ASP.NET form works. In ASP or
HTML a form with an action will transfer that forms items to another
page.
From the documentation I have read, there is nothing that describes
the use of the forms action
atribute. I did find text on the MSDN that describes the use of
|
by: Mark Waser |
last post by:
Hi all,
I'm trying to post multipart/form-data to a web page but seem to have
run into a wall. I'm familiar with RFC 1867 and have done this before (with
AOLServer and Tcl) but just can't seem to get it to work in Visual Basic. I
tried coding it once myself from scratch and then modified a class that I
found on a newsgroup (referenced below). Both seem to be doing the same
thing and neither works (or rather, they seem to work but the...
|
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...
|
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,...
| |
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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...
|
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...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |