call vb.net function inside <PARAM> tag in asp.net

Hi there
I have the following:

<OBJECT id="coq" codeBase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
                        height="400" width="550" align="middle" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
                        VIEWASTEXT>
                        <PARAM NAME="_cx" VALUE="14552">
                        <PARAM NAME="_cy" VALUE="10583">
                        <PARAM NAME="Movie" VALUE="coq.swf">
                               =======================================
                        <PARAM NAME="Src" VALUE="coq.swf?<% getData() %>">       <<<<<this is the problem

                                 ETC
                                ETC
                  </OBJECT>

The getData() function returns a string eg:

"?account=11&nme=john"

I am then passing this to a flash movie clip, this works fine when I hard code the SRC string llike so

"coq.swf?account=11&nme=john"

Anyway what I need to know is; can I call a vb.net function to return a string inside this PARAM tag (which seems to be a HTML control).
The getData function will probably get the data from a database and reference session variables, so I really need to be able to call it; saying that, the amount of data will be small so I don't mind placing it in the link.

I'm not using inline coding for the page but it seems that I may have to call the function in an inline manner.

Anyway any help would be greatly recieved, looking forward to hearing from you.

paulleahyAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

amit_gCommented:
Like this ...

<%# getData() %>

If getData() is returning ? then you should take out the ? after coq.swf

<PARAM NAME="Src" VALUE="coq.swf<%# getData() %>">
paulleahyAuthor Commented:
Hi Thanks for the info; unfortunately this will not work with the code behind model, but I have found a work around..
I have taken almost all the html out of the .aspx page and replaced it using:

 Response.write("html markup etc" & getData() & " the rest of the html markup").

in the code behind aspx.vp page.

I found this worked fine although I'm not sure of the overhead involved.
 
I tried it with the code you mentioned; no go I'm afraid, but, from what I've read the problem lies with the way both inline and code behind are compiled.
I think it can be inserted with literals also but to be honest for a NOOB like me anything that works will do.
I'll let this open for a while its probably a problem with a simpler answer (using the Response.write method I had to replace all the inverted commas with single quotes
and include new line chars which is a bit of a pain).

Once again thanks for the response.
amit_gCommented:
I mixed up the data binding syntax. It should be

<PARAM NAME="Src" VALUE="coq.swf<%= getData() %>">

Also make sure getData is a public function in the code behind class of the same page.

Public Function getData()
        Return "Hello There"
End Function

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
paulleahyAuthor Commented:
Hi there
Thanks a lot for the answer, it worked a treat, it saves me having to use the Response.Write method which to be honest was a little extreme.
I changed my method to public included the "=" in the tag and Bob's your uncle.
This means a lot to me and with that in mind I think I'll bump up the points to 500.
Please accept them with my gratitude.
amit_gCommented:
Glad to be of help and thanks for the extra points.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP.NET

From novice to tech pro — start learning today.