Click here to Skip to main content
15,896,118 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Edit mode in GridView changes column width Pin
meeram39527-Oct-08 21:17
meeram39527-Oct-08 21:17 
QuestionTimeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached. Pin
AndersgRex27-Oct-08 6:40
AndersgRex27-Oct-08 6:40 
AnswerRe: Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached. Pin
Rutvik Dave27-Oct-08 6:53
professionalRutvik Dave27-Oct-08 6:53 
AnswerRe: Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached. Pin
AndersgRex27-Oct-08 8:31
AndersgRex27-Oct-08 8:31 
GeneralRe: Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached. Pin
Ashfield27-Oct-08 9:48
Ashfield27-Oct-08 9:48 
QuestionGridView, DetailView and Creating a New Row Pin
Pravinc198427-Oct-08 6:31
Pravinc198427-Oct-08 6:31 
QuestionAJAX update panel Pin
geletaabate27-Oct-08 6:27
geletaabate27-Oct-08 6:27 
Questionvb.net and parsing xml string Pin
KingAndyb27-Oct-08 3:57
KingAndyb27-Oct-08 3:57 
Hi - I'm new to vb.net and stuck with a little problem....I can write the string out as raw data but want to write it out so that it makes sense as "english" (formatted list I suppose). Can anybody help please? Here is my working code:

<%@ Page Language="VB" %>
<%@ Import Namespace="System.Net" %>
<%@ Import Namespace="System.IO" %>
<%@ Import Namespace="System.Xml" %>
<%@ Import Namespace="System.Xml.Xsl" %>



<script runat="server">

Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
Dim strDataToPost As String

Dim myWebRequest As WebRequest
Dim myRequestStream As Stream
Dim myStreamWriter As StreamWriter

Dim myWebResponse As WebResponse
Dim myResponseStream As Stream
Dim myStreamReader As StreamReader

' Create a new WebRequest which targets that page with
' which we want to interact.
myWebRequest = WebRequest.Create( _
"http://test..co.uk/XmlService.asmx")

' Set the method to "POST" and the content type so the
' server knows to expect form data in the body of the
' request.
With myWebRequest
.Method = "POST"
.ContentType = "text/xml"
End With

' Here's the data I'll be sending. It's the same format
' you'd use in a querysting and you should URLEncode any
' data that may need it.





strDataToPost = "<RegionSearch>blah</RegionSearch>"

' Get a handle on the Stream of data we're sending to
' the remote server, connect a StreamWriter to it, and
' write our data to the Stream using the StreamWriter.
myRequestStream = myWebRequest.GetRequestStream()
myStreamWriter = New StreamWriter(myRequestStream)
myStreamWriter.Write(strDataToPost)
myStreamWriter.Flush()
myStreamWriter.Close()
myRequestStream.Close()

' Get the response from the remote server.
myWebResponse = myWebRequest.GetResponse()

' Get the server's response status?

' Just like when we sent the data, we'll get a reference
' to the response Stream, connect a StreamReader to the
' Stream and use the reader to actually read the reply.
myResponseStream = myWebResponse.GetResponseStream()
myStreamReader = New StreamReader(myResponseStream)
litResponseText.Text = myStreamReader.ReadToEnd()
myStreamReader.Close()
myResponseStream.Close()

' Close the WebResponse
myWebResponse.Close()
End Sub

</script>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>ASP.NET HTTP Post Request Sample</title>
</head>
<body>

<form id="myForm" runat="server">
<p>
<strong>This page made an HTTP post request to:</strong><br />
<code> http://test..co.uk/XmlService.asmx
</code>
</p>

<p>
<strong>It sent regions request data:</strong><br />

</code>
</p>

<p>
<strong>The Response:</strong>
</p>
<table border="1">
<tr><td>
<asp:Literal ID="litResponseText" runat="server" />
</td></tr>
</table>




<hr />

</form>



</body>
</html>



Kind regards
Andy
QuestionNEED HELP: Runing proces using the process.start() Pin
sSupergirl27-Oct-08 2:04
sSupergirl27-Oct-08 2:04 
AnswerRe: NEED HELP: Runing proces using the process.start() Pin
SeMartens27-Oct-08 2:30
SeMartens27-Oct-08 2:30 
GeneralRe: NEED HELP: Runing proces using the process.start() Pin
sSupergirl27-Oct-08 5:54
sSupergirl27-Oct-08 5:54 
QuestionQuery String Pin
srinivaskonijeti27-Oct-08 2:00
srinivaskonijeti27-Oct-08 2:00 
AnswerRe: Query String Pin
Kannan Ar27-Oct-08 3:44
professionalKannan Ar27-Oct-08 3:44 
GeneralRe: Query String Pin
Ridge Howison27-Oct-08 11:30
Ridge Howison27-Oct-08 11:30 
QuestionGetting dataitems from a LinqDatasource/ListView in code Pin
AntoonHzn27-Oct-08 1:36
AntoonHzn27-Oct-08 1:36 
QuestionHow this is to be done Pin
Krazy Programmer27-Oct-08 1:19
Krazy Programmer27-Oct-08 1:19 
QuestionPls Help Me..CommandName value not accessible inside ItemCommand Handler event.. Pin
Sameer-The Performer27-Oct-08 1:05
Sameer-The Performer27-Oct-08 1:05 
AnswerRe: Pls Help Me..CommandName value not accessible inside ItemCommand Handler event.. Pin
Kannan Ar27-Oct-08 3:47
professionalKannan Ar27-Oct-08 3:47 
QuestionRe: Pls Help Me..CommandName value not accessible inside ItemCommand Handler event.. Pin
Sameer-The Performer28-Oct-08 18:53
Sameer-The Performer28-Oct-08 18:53 
QuestionFlash Video Component And Spyware Control for Uploaded Contents Pin
Sosyopat26-Oct-08 23:38
Sosyopat26-Oct-08 23:38 
AnswerRe: Flash Video Component And Spyware Control for Uploaded Contents Pin
Kannan Ar27-Oct-08 1:02
professionalKannan Ar27-Oct-08 1:02 
GeneralRe: Flash Video Component And Spyware Control for Uploaded Contents Pin
Sosyopat27-Oct-08 1:49
Sosyopat27-Oct-08 1:49 
Questioniis 5.1 give error for asp.net 3.5 applicatoin Pin
mr_muskurahat26-Oct-08 23:25
mr_muskurahat26-Oct-08 23:25 
AnswerRe: iis 5.1 give error for asp.net 3.5 applicatoin Pin
Guffa27-Oct-08 0:53
Guffa27-Oct-08 0:53 
GeneralRe: iis 5.1 give error for asp.net 3.5 applicatoin Pin
mr_muskurahat27-Oct-08 1:09
mr_muskurahat27-Oct-08 1:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.