Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how do i use response.binarywrite or some equivelent in innerhtml

Status
Not open for further replies.

yongbum

Programmer
Dec 15, 2005
48
IL
hi,

I was using Response.BinaryWrite(myByteArray)to output dynamc content. The content itself appeared OK. but the html was screwed up (first I got the response.binarywrite output then the html - <html><header><body> ect.) which caused other major problems such as overwriting my session variables. So my question is, if I'm generating the dynamic content using InnerHtml what is the equivelent that I need for Response.BinaryWrite that will give me the same output?
 
the innerHTML will render first, then other dynamic content, so id guess that you should change the order you are populating this in your page load/page init

the "control" you are putting this in is a protected HTMLGenericControl or is this a span or div tag?
 
I want to put it in a table data cell
 
might bug a couple of people doing it this way, but might get it done???

<td>
<% Response.Write(name()) %>
</td>

....

function name() As String
name = CStr(Response.BinaryWrite(myByteArray))
end function
 
Thanks for the suggestion but

CStr(Response.BinaryWrite(myByteArray)) dosn't compile
 
can u give detail on why its not compiling please?
error messages n such...

do you have myByteArray declared and values set somewhere?
on the same page? global var?
is this not an avenue you want to try?

are you doing this in vb or c# or other?

let us know
 
Its flagged (blue underline) when I write the function
mybytearray is declared and has values I'm using VS 2003
vb.net, and I'm desperate to get this to work.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top