473,386 Members | 1,835 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Getting and sending data from third party software

Hi, I have a third party software that needs to send
information to an .aspx page for processing to communicate
with an SQL database. The software sends the information
something like this:

Mypage.aspx?Password=Mypassword

When this request hits the page, I need to pull that
variable Mypassword to use in my VB function to query the
database. I'm confused on how to get it. I tried using
Request.Form("password") and Request.QueryString
("password") but it doesn't work. I'm also going to have
to send a response back to this other software (Authorware
Macromedia). Anyone know how this should be done?
Nov 18 '05 #1
3 1979
Request.Querystring should work. I believe it is case sensitive though. So
you need to use Request.Querystring.Item("Password")

"Beryl Small" <be********@computechsi.com> wrote in message
news:04****************************@phx.gbl...
Hi, I have a third party software that needs to send
information to an .aspx page for processing to communicate
with an SQL database. The software sends the information
something like this:

Mypage.aspx?Password=Mypassword

When this request hits the page, I need to pull that
variable Mypassword to use in my VB function to query the
database. I'm confused on how to get it. I tried using
Request.Form("password") and Request.QueryString
("password") but it doesn't work. I'm also going to have
to send a response back to this other software (Authorware
Macromedia). Anyone know how this should be done?

Nov 18 '05 #2
Okay, I figured out how to get the value from the URL.
Request.Querystring works, but I don't know how to get the
value returned from the result of my SQL query back to
authorware. I need to be able to post the result to the
same page that executed Query. Anyone know how to do this?
-----Original Message-----
Hi, I have a third party software that needs to send
information to an .aspx page for processing to communicatewith an SQL database. The software sends the information
something like this:

Mypage.aspx?Password=Mypassword

When this request hits the page, I need to pull that
variable Mypassword to use in my VB function to query the
database. I'm confused on how to get it. I tried using
Request.Form("password") and Request.QueryString
("password") but it doesn't work. I'm also going to have
to send a response back to this other software (AuthorwareMacromedia). Anyone know how this should be done?
.

Nov 18 '05 #3
Well that depends on a few things. You could create a form with the data and
post it to the third party, but I would look into WebRequest/Response. Here
is an example I have snipped, it may need to be changed to work. Also check
this site out.
http://west-wind.com/presentations/d...WebRequest.htm

Public Shared Function mgGetWebcontent(strWebSite as string, strWebPage as
string, strPostData as string, Optional intContentType as int32 = 0,
Optional httpFile as httpPostedFile = nothing) as string

Dim mgWebRequest As HttpWebRequest
Dim mgWebResponse As HttpWebResponse
Dim strText As String
Dim mgStreamReader As StreamReader

Try
mgWebRequest =CType(WebRequest.Create(strWebSite &
strWebPage),HttpWebRequest)
mgWebRequest.timeout = 90000
mgWebRequest.CookieContainer = new cookiecontainer()
dim k as int32
Dim siteUri As New Uri(strWebSite)
for k = 0 to HttpContext.Current.Request.Cookies.count - 1
'add your cookies here
dim ck as cookie = new cookie()
ck.name = HttpContext.Current.Request.Cookies(k).name
next k
mgWebRequest.UserAgent =
HttpContext.Current.Request.Headers("User-Agent")
mgWebRequest.Accept =
HttpContext.Current.Request.Headers("Accepts")

mgWebRequest.headers.add("Cookie",HttpContext.Curr ent.Request.Headers("Cooki
e"))

if strPostData.length > 0 or not httpfile is nothing then

mgWebRequest.Method = "POST"

select case intContentType
Case = 1 'file post
' separate function snipped out will post if you need it
Case else
mgWebRequest.ContentType = "application/x-www-form-urlencoded"
mgWebRequest.ContentLength = strPostData.length 'length
Dim mgStreamWriter As new
StreamWriter(mgWebRequest.GetRequestStream())

mgStreamWriter.Write(strPostData)
mgStreamWriter.Close()
end select
else
mgWebRequest.Method = "GET"
end if
mgWebResponse = CType(mgWebRequest.GetResponse(),HttpWebResponse)

' you may not need the next part if you don't need the response cookies
and text

mgWebResponse.cookies =
mgWebrequest.CookieContainer.GetCookies(mgWebreque st.RequestUri)
mgStreamReader = New StreamReader(mgWebResponse.GetResponseStream())

strText = mgStreamReader.ReadToEnd()
dim i as int32

for i = 0 to mgWebResponse.cookies.count - 1
'add cookies to response
dim hc as httpcookie
hc = new httpcookie(mgWebResponse.cookies.item(i).name)
hc.expires = datetime.now.addyears(50)
hc.path = mgWebResponse.cookies.item(i).path
HttpContext.Current.Response.AppendCookie(hc)
next i
mgStreamReader.Close()
return strText

Catch
'catch processing snipped
end try
End function

"Beryl Small" <ber
yl*****@computechsi.com> wrote in message
news:18****************************@phx.gbl...
Okay, I figured out how to get the value from the URL.
Request.Querystring works, but I don't know how to get the
value returned from the result of my SQL query back to
authorware. I need to be able to post the result to the
same page that executed Query. Anyone know how to do this?
-----Original Message-----
Hi, I have a third party software that needs to send
information to an .aspx page for processing to

communicate
with an SQL database. The software sends the information
something like this:

Mypage.aspx?Password=Mypassword

When this request hits the page, I need to pull that
variable Mypassword to use in my VB function to query the
database. I'm confused on how to get it. I tried using
Request.Form("password") and Request.QueryString
("password") but it doesn't work. I'm also going to have
to send a response back to this other software

(Authorware
Macromedia). Anyone know how this should be done?
.

Nov 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Maria | last post by:
Hi Everyone This is a data base question so don't switch off thinking it is a Data Protection Act Question. I'm Looking for some general information regarding the UK Law on rights to access...
0
by: Damodar Periwal | last post by:
-------------------------------------------------------------- Software Tree Revs Up JDX OR-Mapper With Innovative And High-Performance Features...
0
by: Damodar Periwal | last post by:
-------------------------------------------------------------- Software Tree Revs Up JDX OR-Mapper With Innovative And High-Performance Features...
18
by: Damodar Periwal | last post by:
-------------------------------------------------------------- Software Tree Revs Up JDX OR-Mapper With Innovative And High-Performance Features...
0
by: Damodar Periwal | last post by:
-------------------------------------------------------------- Software Tree Revs Up JDX OR-Mapper With Innovative And High-Performance Features...
6
by: Ben Finney | last post by:
Howdy all, I'm improving an existing application that's partly written using Python and the standard library. Many of the improvements I want to make can be done by using third-party free...
2
by: Aravind | last post by:
I have 3rd party dll plugin COM interface, when loaded executes the following functions. public class Test: IPlugin { public void Innitialize(IPluginApp obj, int pluginHandle) { //gets the...
162
by: Sh4wn | last post by:
Hi, first, python is one of my fav languages, and i'll definitely keep developing with it. But, there's 1 one thing what I -really- miss: data hiding. I know member vars are private when you...
0
by: =?Utf-8?B?Q2hhcmxpZQ==?= | last post by:
Hi, This apparently is a common problem and I've yet to read a solution that actually works for my specific situation. I have a Zebra RW220 printer that I connect to via Bluetooth connection...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.