> How do you use asp.net 2.0 (C#) to generate the javascript
> dynamically????
http://msdn2.microsoft.com/en-us/library/z9h4dk8y(VS.80).aspx

Signature
Mark Rae
ASP.NET MVP
http://www.markrae.net
Bjarke - 08 Sep 2007 19:36 GMT
> > How do you use asp.net 2.0 (C#) to generate the javascript
> > dynamically????
[quoted text clipped - 4 lines]
> Mark Rae
> ASP.NET MVPhttp://www.markrae.net
Thanks Mark I know the RegisterStartupScript function. It adds
whatever you tell it to add to the beginning of a web page. What I
need is something that is possible to link to like this:
<script type="text/javascript" src="http://someAdress.aspx/
OrSomethingLikely"> (this snippet is supposed to be placed on a
different site that isnt even is powered by asp.net).
http://ditcentrum.dk/Nordjyske/OutputNordjyskeBlogs.aspx
Thanks
)
Bjarke - 08 Sep 2007 19:43 GMT
> > How do you use asp.net 2.0 (C#) to generate the javascript
> > dynamically????
[quoted text clipped - 4 lines]
> Mark Rae
> ASP.NET MVPhttp://www.markrae.net
Thanks Mark I know the RegisterStartupScript function. It adds
whatever you tell it to add to the beginning of a web page. What I
need is something that is possible to link to like this:
<script type="text/javascript" src="http://someAdress.aspx/
OrSomethingLikely"> (this snippet is supposed to be placed on a
different site that isnt even is powered by asp.net).
just like this link does:
http://ditcentrum.dk/Nordjyske/OutputNordjyskeBlogs.aspx
when it referred to like this:
<html>
<body>
<script type = text/javascript src="http://ditcentrum.dk/Nordjyske/
OutputNordjyskeBlogs.aspx"></script>
</body>
</html>
Thanks
Thanks
> I am working on an asp.net 2.0 web application, where I am making an
> add to place on a different site. This add consists of some
> dropdownboxes and some javascript.
I suppose that you mean an ad? ;)
> the site on which the add is supposed to be has a table and the add is
> included like this:
[quoted text clipped - 15 lines]
>
> Bjarke
Just remove all the markup in the page (except the @Page directive), and
use Response.Write in the code behind to write out the script as strings.

Signature
Göran Andersson
_____
http://www.guffa.com
Bjarke - 08 Sep 2007 22:56 GMT
Thanks G?ran!
Really nice and simple.
Bjarke - 10 Sep 2007 04:47 GMT
Just a small detail to finish the question.
The project I am working in is using themes. If I just delete
everything but the page directive I get an error.
So I disabled themes for that particular page as like it is shown
here
http://msdn2.microsoft.com/en-us/library/kx3kzht7(VS.80).aspx
on msdn.
I still get an error stating that I have to have a <head
runat="server"> section.
Is it possible to get rid of this?
Göran Andersson - 10 Sep 2007 07:54 GMT
> Just a small detail to finish the question.
>
[quoted text clipped - 10 lines]
>
> Is it possible to get rid of this?
When I make a page where I don't want the theming, I just put Theme=""
in the @Page directive.

Signature
Göran Andersson
_____
http://www.guffa.com