0

Hello,

I have a script written in C# (.NET) and within this script I have an IF statement and when this IF statement is TRUE I want to execute the following external script that I placed just under the </head>:

<script id='name' type='text/javascript' src='https://xx' integration='jscart-wizard'></script>

How can I do that?


Thank you in Advance

2
Contributors
5
Replies
6
Views
8 Years
Discussion Span
Last Post by LizR
0

Exactly as you described. Although asp.net is probably best asked in its forum

Hi,
the external script won't execute unless I press a related button.. I would like that script to execute automatically if my IF statement is true.

I will pass this question to asp.net forum if I can't get an answer here.

Thanks again

0

but the onClick event is for executing a code when a button is clicked right? Sorry I'm kind of a newbie here..

I don't want to manually press a button at all.. I just want to execute the external script that my button would eitherwise do if I manually pressed it but I want to do this automatically.. by calling the button to get executed from my C# code

thanks again

0

Then you're going round in circles and the button shouldnt be there..

if stuff true, <script>

its that simple, as you said in the beginning

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.