Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. [Message Deleted]

[Message Deleted]

Scheduled Pinned Locked Moved ASP.NET
8 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    Burim Rama
    wrote on last edited by
    #1

    [Message Deleted]

    C 1 Reply Last reply
    0
    • B Burim Rama

      [Message Deleted]

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      This looks kind of trivial. Do you not know any ASP.NET ? Looks like you can send an SMS by passing it on the URL to this site. So, the first part is just building a string, use a stringbuilder for that. The second part, you just do a send and see if the response is I think the classes are called HTTPRequest and HTTPResponse. This is not ASP.NET code, it's just C# code that makes a HTTP request. Doing an ASP.NET page that takes the details to post, is more than can be done in a forum reply, and also trivial.

      Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

      B 1 Reply Last reply
      0
      • C Christian Graus

        This looks kind of trivial. Do you not know any ASP.NET ? Looks like you can send an SMS by passing it on the URL to this site. So, the first part is just building a string, use a stringbuilder for that. The second part, you just do a send and see if the response is I think the classes are called HTTPRequest and HTTPResponse. This is not ASP.NET code, it's just C# code that makes a HTTP request. Doing an ASP.NET page that takes the details to post, is more than can be done in a forum reply, and also trivial.

        Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

        B Offline
        B Offline
        Burim Rama
        wrote on last edited by
        #3

        thanks... but i have problem with httprequest or httpresponse its not working.. Error 8 'System.Web.HttpResponse' is a 'type' but is used like a 'variable'

        C 1 Reply Last reply
        0
        • B Burim Rama

          thanks... but i have problem with httprequest or httpresponse its not working.. Error 8 'System.Web.HttpResponse' is a 'type' but is used like a 'variable'

          C Offline
          C Offline
          Christian Graus
          wrote on last edited by
          #4

          I guess if you posted the code, I would be able to correct it.

          Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

          B 1 Reply Last reply
          0
          • C Christian Graus

            I guess if you posted the code, I would be able to correct it.

            Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

            B Offline
            B Offline
            Burim Rama
            wrote on last edited by
            #5

            // the problem is her... gv_reply = httpRequest(gv_url); if (gv_reply == "") { ' If the reply contains the tag <succes> the SMS has been sent. Response.Write "The message has been sent. Server response: " & gv_reply } else ' If not, there has been an error. Response.Write "The message has NOT been sent. Server response: " & gv_reply //To here..

            C 1 Reply Last reply
            0
            • B Burim Rama

              // the problem is her... gv_reply = httpRequest(gv_url); if (gv_reply == "") { ' If the reply contains the tag <succes> the SMS has been sent. Response.Write "The message has been sent. Server response: " & gv_reply } else ' If not, there has been an error. Response.Write "The message has NOT been sent. Server response: " & gv_reply //To here..

              C Offline
              C Offline
              Christian Graus
              wrote on last edited by
              #6

              Burim Rama wrote:

              gv_reply = httpRequest(gv_url);

              What is httpRequest ? What made you think this would work ? Try this: http://en.csharp-online.net/HTTP_Post[^]

              Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

              B 1 Reply Last reply
              0
              • C Christian Graus

                Burim Rama wrote:

                gv_reply = httpRequest(gv_url);

                What is httpRequest ? What made you think this would work ? Try this: http://en.csharp-online.net/HTTP_Post[^]

                Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

                B Offline
                B Offline
                Burim Rama
                wrote on last edited by
                #7

                i need to se if my rquest from the page is succses like a posted the first topic in php .. thanks christian.

                C 1 Reply Last reply
                0
                • B Burim Rama

                  i need to se if my rquest from the page is succses like a posted the first topic in php .. thanks christian.

                  C Offline
                  C Offline
                  Christian Graus
                  wrote on last edited by
                  #8

                  That's why you do the post of the data and grab the response. Here is the code from my credit card class, which uses the methods you need to use. string strPost = transaction.ToString(); StreamWriter myWriter = null; HttpWebRequest objRequest = (HttpWebRequest)WebRequest.Create((transaction.TestRequest) ? testurl : url); objRequest.AuthenticationLevel = System.Net.Security.AuthenticationLevel.MutualAuthRequired; objRequest.Method = "POST"; objRequest.ContentLength = strPost.Length; objRequest.ContentType = "application/x-www-form-urlencoded"; try { myWriter = new StreamWriter(objRequest.GetRequestStream()); myWriter.Write(strPost); } catch (Exception e) { return null; } finally { if (myWriter != null) myWriter.Close(); } string result = string.Empty; HttpWebResponse objResponse = (HttpWebResponse)objRequest.GetResponse(); using (StreamReader sr = new StreamReader(objResponse.GetResponseStream())) { result = sr.ReadToEnd(); // Close and clean up the StreamReader sr.Close(); } AuthorizeResponse response = new AuthorizeResponse(result); return response;

                  Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

                  1 Reply Last reply
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • World
                  • Users
                  • Groups