Here is my scenario. I want to post XML to an AXD page (C#). Simple enough, however my test page that posts the XML, does happen to break into my Axd page on the Load function, but I do not have Session state. So, my question is, with my test XML provided, what are the steps I need to use to set this up?
Test XML (this is trivial): <test><name><fi rst>A</first><last>M</last></name></test>
I then post the XML like this...
<HTML>
<body MS_POSITIONING= "FlowLayout ">
<form id="Form1" action="Find/SearchEpic.axd" method="post">
<textarea name="searchQue ry" cols="100" rows="15">
... my text xml goes here ...
</textarea>
<br>
<input type="submit" value="Post This XML">
</form>
</body>
</HTML>
Then I create an axd page...
public class SearchXml : System.Web.UI.P age {
protected override void OnLoad(EventArg s e) {
System.IO.Strea mReader s = new System.IO.Strea mReader(HttpCon text.Current.Re quest.InputStre am);
XmlDocument receiveXml = new XmlDocument();
.... et cetera ...
}
I process the posted XML input, but I do not have access to Session state, so I cannot get access to some values I need. Am I doing something wrong, or is this behavior expected? Also, in order to test this, should I set up a different way to post my xml as opposed to what I listed above? If so, could someone please show me in C#, the steps required to post XML?
Thanks,
Alex 1 2024
Hello Alex,
Hey Alex... I solved your problem and committed this to the CVS servers at
work... :=)
--
Matt Berther http://www.mattberther.com Here is my scenario. I want to post XML to an AXD page (C#). Simple enough, however my test page that posts the XML, does happen to break into my Axd page on the Load function, but I do not have Session state. So, my question is, with my test XML provided, what are the steps I need to use to set this up?
Test XML (this is trivial): <test><name><fi rst>A</first><last>M</last></name></test>
I then post the XML like this... <HTML> <body MS POSITIONING="Fl owLayout"> <form id="Form1" action="Find/SearchEpic.axd" method="post"> <textarea name="searchQue ry" cols="100" rows="15"> ... my text xml goes here ... </textarea> <br> <input type="submit" value="Post This XML"> </form> </body> </HTML> Then I create an axd page... public class SearchXml : System.Web.UI.P age { protected override void OnLoad(EventArg s e) {
System.IO.Strea mReader s = new System.IO.Strea mReader(HttpCon text.Current.Re quest.InputStre am);
XmlDocument receiveXml = new XmlDocument();
.... et cetera ...
}
I process the posted XML input, but I do not have access to Session state, so I cannot get access to some values I need. Am I doing something wrong, or is this behavior expected? Also, in order to test this, should I set up a different way to post my xml as opposed to what I listed above? If so, could someone please show me in C#, the steps required to post XML?
Thanks,
Alex This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Thomas Scheiderich |
last post by:
I am trying to understand Session variables and ran into a question on
how they work with data that is passed.
I have an HTM file that calls an ASP file and sends the name either by
GET or POST.
When I find is that if I send the value by the GET method,
response.write("From QueryString: " &
Request.QueryString("usernamefromform") & "<br><br>")
|
by: khawar |
last post by:
my application is in asp.net using C#
hi guys having a complicated problem
i am using payflowlink to process CC payments
I have to send a httppost to their servers. The problem
is how do i do a post where i get these values like the
amount from the database.
eg of the post:
<form method="post"
action="https://payflowlink.verisign.com/payflowlink.cfm">
<input type="hidden" name="name" value="john adams">
|
by: Matt |
last post by:
When we submit the form data to another page, we usually do the following:
<form action="display.aspx" method="post"> will submit the form data and
open
display.asp in the current browser
<form action="display.aspx" method="post" target="_blank"> will submit the
form data
and open display.asp in a new browser
|
by: Manuel |
last post by:
I have to log into a website and retrieve some information. The problem is
that the post isn't "normal". I'm used to passing post values in the form
of: Variable1=Value1&Variable2=Value2 etc.
I used Live Http Headers to retrieve the POST information, I included it at
the end of this message.
Can anyone tell me how to make THIS kind of post?
Another thing,
"Content-Type: multipart/form-data;
|
by: glenn |
last post by:
I am use to programming in php and the way session and post vars are past
from fields on one page through to the post page automatically where I can
get to their values easily to write to a database or continue to process on
to the next page.
I am now trying to learn ASP to see if we can replace some of our
applications that were written in php with an ASP alternative. However,
after doing many searches on google and reading a couple...
| |
by: moriman |
last post by:
Hi,
The script below *used* to work. I have only just set up a
server, PHP etc again on my Win98 system and now it doesn't?
On first loading this page, you would have
$p =
and the button image below it.
|
by: c676228 |
last post by:
Hi,
I am new to this discussion forum. I started to post questions on this forum
since this Jan. and got many good responses and I am very appreciated to
those who are willing to help with their expertise. That save me a lot of
time and stress.
I want to rate the post, but I only see questions "is this post helpful" and
" why should I rate a post" link. I didn't see any thing "rate the post"
link. I already sign into the community...
|
by: JansenH |
last post by:
We have implemented a 'HTTP Post' client in C# that posts Xml documents to a
webserver. This is working fine if the post rate is one post for every 20
seconds. But if the post rate is increased to one post for every 10 seconds
the client start getting error 403 'forbidden' from the webserver after a
short period of time. The webserver is IIS. The choking of the client/server
communication when doing high frequency posting is due to that we...
|
by: Peter Michaux |
last post by:
Hi,
All Ajax libraries I've read use encodeURIComponent() on the name-
value pairs extracted from forms before POST ing the result to the
server with and xmlhttprequest. I can understand why this encoding is
required in the case of a GET request and the form data is attached as
a URI query string; however, why is the encoding necessary for POST
requests?
Thanks,
|
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,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
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: 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: 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
|
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...
| |