ZeroEffect Posted October 11, 2005 Posted October 11, 2005 I have an application that I need to modify to do the following. Take data from a source and post it to an ASP script. the HTML on a web page would look like this. <HEAD> </HEAD> <BODY> <form action="http://website.net/zfmw/123/datapost.asp" method="POST"> ID: <input type="text" name="ID" value="1234"><br> Data 1: <input type="text" name="item1" value="Data 1"><br> Data 2: <input type="text" name="item2" value="Data 2"><br> <input type="submit" name="submit"> </form> </BODY> </HTML> I have the data all ready split and assigned in my app but how would I go about using this line. <form action="http://website.net/zfmw/123/datapost.asp" method="POST"> I have been hunting for some examples and such but no real luck. Any thoughts? Thanks for any help you may be able to give me. ZeroEffect Quote If you can't find it, Build It. There is no place Like 127.0.0.1 also don't forget 1 + 1 = 10
ZeroEffect Posted October 12, 2005 Author Posted October 12, 2005 Update I found an example using WebClient and all it does is time out on me. Here is the code I'm using Dim WebClient As New System.Net.WebClient Dim ParamColl As New System.Collections.Specialized.NameValueCollection ParamColl.Add("ID", "NowPlaying") ParamColl.Add("Artist", "Mother Love Bone") ParamColl.Add("Title", "Chloe Dancer") TextBox1.Text = "Collection Created" & vbCrLf Try Dim WebClientResponse As Byte() WebClientResponse = WebClient.UploadValues("http://media.radcity.net/zfmw/nowplayingpost.asp", "POST", ParamColl) TextBox1.Text = TextBox1.Text & System.Text.Encoding.ASCII.GetString(WebClientResponse) Catch ex As Exception TextBox1.Text = ex.ToString End Try Any Thoughts, If I build a webpage and post the data that way eveything seems to work fine. Or is there a better way. Thanks ZeroEffect Quote If you can't find it, Build It. There is no place Like 127.0.0.1 also don't forget 1 + 1 = 10
ZeroEffect Posted October 17, 2005 Author Posted October 17, 2005 OK I have the code above posting to the site but I have timeout when waiting for a response. I really don't need a response I just want to post the data. All I am doing is remotly loading data into a data base where the information in that data base is pulled when a user loads the webpage. Is there a way to kill the response in webclient? Thanks ZeroEffect Quote If you can't find it, Build It. There is no place Like 127.0.0.1 also don't forget 1 + 1 = 10
bri189a Posted October 18, 2005 Posted October 18, 2005 You're mixing languages - it's highly NOT recommended to mix asp.net with asp. If you were to do this, you need to strongly name your dll and install it on the remote server then create an instance of the object in your asp page: Server.CreateObject("YOURDLLNAME") - and that's if I recall the hack I saw out there somewhere correctly....and that's exactly what it is, a hack. Please, do yourself, and anyone who has to maintain this a favor; don't mix classic asp with .NET! Quote
ZeroEffect Posted October 18, 2005 Author Posted October 18, 2005 I'm not sure how I am mixing ASP.Net and ASP? I'm building a VB.NET App that "Post" data (ID=Value x 3) to an ASP url/script. May be I wasn't clear on what I was trying to do. Well I found a class that someone else but using HttpWebRequest and everything is working great. I am going throught it to see how it works and what I was doing wrong. I was close I had a couple of things that were off. One was how I was building the ParamColl, so all is well with my application. Thanks ZeroEffect Quote If you can't find it, Build It. There is no place Like 127.0.0.1 also don't forget 1 + 1 = 10
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.