Jump to content

Return Var From Sendandload


Guest nilo

Recommended Posts

Hello-I have a question about my return var from a sendAndLoad.I am doing a sendAndLoad to an aspx Page sending and receiving vars. When I get the return vars back from the aspx Page I do receive the correct var but it also brings back the entire aspx source code.Why does it do this?How can I stop it from bringing the aspx source code back?When I debug on the aspx side it shows only the value of the var not the aspx source code. So I know I am not passing that to flash........at least not knowingly.This is what is returned to me: (the correct var of "HP OfficeJet Pro" then it shows all the code)

HP OfficeJet Pro<!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></title></head><body> <form name="form1" method="post" action="ITrequest.ASPX" id="form1"><div><input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwULLTE2MTY2ODcyMjlkZBQBKPDJeJI78NXdpY7ix3SKfPI " /></div> <div> </div> </form></body></html>
I am Using Flash 8 AS 2.0 & VB ASP.Net 2.0Hopefully the code below will make more sense. Thanks in advance.Action Script:
sendVars = new LoadVars();resultVars = new LoadVars();		sendVars.desc = _root.desc_fld.text;sendVars.sendAndLoad("ITrequest.ASPX",resultVars,"POST");resultVars.onLoad = function(success) {			if (success) {				[highlight=skyblue]_root.desc_fld.text = resultVars.desc;[/highlight]                                                             [quote]This is where I place the return var so I can see the results.[/quote]							} else {				trace("There has been an Error.");			}		};ASPX Code: (to return the var back to flash)[codebox]Protected Sub form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles form1.Load        Dim desc As New String("desc=HP OfficeJet Pro")        Response.Write(desc)End Sub

Thanks for any help you may be able to provide.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...