Go Back   CodingForums.com > :: Server side development > ASP.NET

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 11-03-2005, 09:27 PM   PM User | #1
spudgun
New to the CF scene

 
Join Date: Nov 2005
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
spudgun is an unknown quantity at this point
Reading an XML post in an ASP.NET web site

I desperately need some help on this. I have a website that will recieve votes via sms (text messages). The person voting will send a message to a certain number which will then forward on an xml post to an address I have specified.

I've sent up an aspx file at this point with a form on it. I know how to look through the xml and get out the data I need but what I need help with is how I read that XML post in the first place. How to I get the aspx file to capture the XML post and then allow me to read through it?

Cheers
spudgun is offline   Reply With Quote
Old 11-03-2005, 09:49 PM   PM User | #2
boywonder
Regular Coder

 
Join Date: Jun 2002
Location: New York, USA
Posts: 175
Thanks: 0
Thanked 0 Times in 0 Posts
boywonder is an unknown quantity at this point
Are you trying to read XML from a remote URL?

http://samples.gotdotnet.com/QuickSt...adFromUrl.aspx
boywonder is offline   Reply With Quote
Old 11-03-2005, 09:57 PM   PM User | #3
spudgun
New to the CF scene

 
Join Date: Nov 2005
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
spudgun is an unknown quantity at this point
No, what will happen is that after an sms is recieved an xml message will be sent to the url that I've specified. As it won't be saving an xml file for me to read I'm at aloss to figure out how to read the data and then add it to my database
spudgun is offline   Reply With Quote
Old 11-04-2005, 03:02 AM   PM User | #4
kampfer
New Coder

 
Join Date: Oct 2005
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
kampfer is an unknown quantity at this point
this article should help with the xml part of reading

here is the database part

Dataset myDataset = new Dataset( );
myDataset.ReadXml( streamobject ); // think that's how it works...
// display results in a datagrid
myDataGrid.DataSource = myDataset.Tables[0].DefaultView;
myDataGrid.DataBind( );

string strConnection = " your database connection ";
OleDbConnection objConnection = new OleDbConnection( strConnection );
OleDbCommand objCommand = new OleDbCommand(objConnection );
objCommand.CommandText = "INSERT INTO ..."
objCommand.ExecuteNonQuery()

hope this helps
-john

Last edited by kampfer; 11-04-2005 at 03:12 AM..
kampfer is offline   Reply With Quote
Old 11-04-2005, 07:14 AM   PM User | #5
spudgun
New to the CF scene

 
Join Date: Nov 2005
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
spudgun is an unknown quantity at this point
Thanks for that but getting the data into the database isn't the issue I'm having difficulty with. Its how I read the XML post in the first place
spudgun is offline   Reply With Quote
Old 11-15-2005, 04:39 AM   PM User | #6
glenngv
Supreme Master coder!


 
glenngv's Avatar
 
Join Date: Jun 2002
Location: Los Angeles, CA Original Location: Philippines
Posts: 10,241
Thanks: 0
Thanked 112 Times in 111 Posts
glenngv will become famous soon enough
How is XML data passed to your site? Is it submitted to you via POST (upload form or normal form submission?) or GET or what?
__________________
Glenn
_____________________________________________
Play Tower of Hanoi Android app (Ad-FREE!)
Play Tower of Hanoi Android app (FREE!)
Go to Tower of Hanoi Leaderboard
Play Tower of Hanoi Facebook app
glenngv is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 03:03 PM.


Advertisement
Log in to turn off these ads.