I am using Vb.Net windows application and I logon to the remote server. Once,
I logon, I get the SessionID.
like.....
If Not HttpWResponse Is Nothing Then
Dim strm As Stream = HttpWResponse.GetResponseStream()
Dim encode As Encoding =
System.Text.Encoding.GetEncoding("utf-8")
Dim sr As New StreamReader(strm, encode)
'Dim XmlRead = New
XmlTextReader(HttpWResponse.GetResponseStream())
'xmlDoc.Load(XmlRead)
xmlDoc.Load(sr)
Return xmlDoc
Console.WriteLine("Response: {0}", sr.ReadToEnd())
Her, sr.Read to end goes like this:Response:<?xml version = '1.0'
encoding='iso-8859-1'><LoginResponse xmlns="
blahblah><status>success></status><SessionID>.....</SessionID></LoginResponse>
In my class, I declare
Dim g_SessionID As String
Now, I want to use this Session_ID in another function like this:
Private Sub btQueryAssetList_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btQueryAssetList.Click
Dim queryAssetListXml As String
Dim queryAssetListResponse As XmlDocument
queryAssetListXml = "<?xml version='1.0' ?>" & _
"<QueryAssetList2
xmlns=""urn:schemas-tms:QueryAssetList2"">" & _
"<SessionID>" & g_SessionID & "</SessionID>" & _
"</QueryAssetList2>"
queryAssetListResponse = SendXmlRequest(queryAssetListXml)
But, when I run the pgm I notice that I don't get the value of Session_ID
read/stored in the queryAssetListXml. How should I do this
I appreciate ur quick response and thanku in advance.
"Onawole, Clement Oladapo" wrote:
Winforms or webforms?
In Winforms, u can make the SessionID a public or internal property of the
form and in WebForms use the Session object to hold this value.
"XML newbie: Urgent pls help!"
<XM********************@discussions.microsoft.co m> wrote in message
news:43**********************************@microsof t.com... If I get SessionID in 1 function how do I carry that SessionID(value of
this
SessionID) to another function or another form within the same project