From: Mark Rae [MVP] on
"Andrew Morton" <akm(a)in-press.co.uk.invalid> wrote in message
news:833dcbFgd6U1(a)mid.individual.net...

> ...and quotes around the string.
>
> This computer-programming thing needs so many fiddly bits, doesn't it <g>

:-)


--
Mark Rae
ASP.NET MVP
http://www.markrae.net

From: Miro on
lol

Yeah I was trying first to do it with just a label, and then set a variable
in my .js file to a value from my asp.net function which I have now got
working.

I know once i got the function working with protected i can do a "
protected dim bla as string = "hi"

Thanks for all the help.

I need to read up on 'protected/friend ..... and so on"

Cheers'

Miro

"Mark Rae [MVP]" <mark(a)markrae.net> wrote in message
news:uEzW6s93KHA.5880(a)TK2MSFTNGP04.phx.gbl...
> "Andrew Morton" <akm(a)in-press.co.uk.invalid> wrote in message
> news:833dcbFgd6U1(a)mid.individual.net...
>
>> ...and quotes around the string.
>>
>> This computer-programming thing needs so many fiddly bits, doesn't it <g>
>
> :-)
>
>
> --
> Mark Rae
> ASP.NET MVP
> http://www.markrae.net

From: Alexey Smirnov on
On Apr 19, 9:01 pm, "Miro" <m...(a)beero.com> wrote:
> lol
>
> Yeah I was trying first to do it with just a label, and then set a variable
> in my .js file to a value from my asp.net function which I have now got
> working.
>
> I know once i got the function working with protected i can do a   "
> protected dim bla as string = "hi"
>
> Thanks for all the help.
>
> I need to read up on 'protected/friend .....  and so on"
>
> Cheers'
>
> Miro
>
> "Mark Rae [MVP]" <m...(a)markrae.net> wrote in messagenews:uEzW6s93KHA.5880(a)TK2MSFTNGP04.phx.gbl...
>
>
>
> > "Andrew Morton" <a...(a)in-press.co.uk.invalid> wrote in message
> >news:833dcbFgd6U1(a)mid.individual.net...
>
> >> ...and quotes around the string.
>
> >> This computer-programming thing needs so many fiddly bits, doesn't it <g>
>
> > :-)
>
> > --
> > Mark Rae
> > ASP.NET MVP
> >http://www.markrae.net

*.js is not processed by asp.net engine by default. The trick with
"injection" will work when you will put your client script inside
*.aspx
From: Miro on
Ahh that is good to know.

I currently have it embedded in my aspx but I will be moving it to my .js
file which then by what you are saying - it would be breaking it.

I will test it out ...thanks

Miro

"Alexey Smirnov" <alexey.smirnov(a)gmail.com> wrote in message
news:c75aa393-8cd5-4de9-9d8d-9f98c15e5045(a)x42g2000vba.googlegroups.com...
> On Apr 19, 9:01 pm, "Miro" <m...(a)beero.com> wrote:
>> lol
>>
>> Yeah I was trying first to do it with just a label, and then set a
>> variable
>> in my .js file to a value from my asp.net function which I have now got
>> working.
>>
>> I know once i got the function working with protected i can do a "
>> protected dim bla as string = "hi"
>>
>> Thanks for all the help.
>>
>> I need to read up on 'protected/friend ..... and so on"
>>
>> Cheers'
>>
>> Miro
>>
>> "Mark Rae [MVP]" <m...(a)markrae.net> wrote in
>> messagenews:uEzW6s93KHA.5880(a)TK2MSFTNGP04.phx.gbl...
>>
>>
>>
>> > "Andrew Morton" <a...(a)in-press.co.uk.invalid> wrote in message
>> >news:833dcbFgd6U1(a)mid.individual.net...
>>
>> >> ...and quotes around the string.
>>
>> >> This computer-programming thing needs so many fiddly bits, doesn't it
>> >> <g>
>>
>> > :-)
>>
>> > --
>> > Mark Rae
>> > ASP.NET MVP
>> >http://www.markrae.net
>
> *.js is not processed by asp.net engine by default. The trick with
> "injection" will work when you will put your client script inside
> *.aspx

From: Alexey Smirnov on
On Apr 20, 4:03 pm, "Miro" <m...(a)beero.com> wrote:
> Ahh that is good to know.
>
> I currently have it embedded in my aspx but I will be moving it to my .js
> file which then by what you are saying - it would be breaking it.
>
> I will test it out ...thanks
>
> Miro
>

It's related only to that part where you get the values from the code-
behind. That means that you should keep that part in aspx and the rest
of the script can be moved to the external js-file.

Like this

<script language="javascript" type="text/javascript">
var x = '<%= fromcodebehind %>';
</script>
<script src="external.js" type="text/javascript"></script>

Hope this helps