HELLO,
How to run as clientside script in asp.net web application
Regards
Sreejesh S P
JSCRIPT IN c#
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Akkiraju IvaturiRank #473 · 5.3K reputationPosted Jan 18, 2013, 7:32 PM EST
function hi(var someVar)
{
document.write("hi " + someVar);
}
in .NET on a method you wish to call the javascript method from:
string whatever = "blahblah";
Page.RegisterStartupScript("myScript", "");
Sreejesh SPRank #1,975 · 740 reputationPosted Jan 20, 2013, 4:33 AM EST
Akkiraju IvaturiRank #473 · 5.3K reputationPosted Jan 20, 2013, 6:15 AM EST
<script type="text/javascript" language="javascript">
function
hi(someVar)
{document.write(
"hi " + someVar);
}
script>
I have tested it and it works.