javascript - C# - Sending value to HREF in html -


i have written project in c# in load html webpage if event occurs during teh course of project usage.

my issue inside html page, have href node inside tag such:

<a href="http://pseudo01.hddn.com/vod/demo.flowplayervod/flowplayer-700.flv"             style="display:block;width:inherit;height:inherit;background-color: black;overflow:hidden"            id="player">         </a> 

i change href value programatically sending c# variable (called myhreffile) depending on user did.

how can done?

you can this

<a href="<%= somemethodthatgethrefvalue() %>"   style="display:block; width:inherit;height:inherit; background-color:black;  overflow:hidden"   id="player">click</a> 

call method decide should href link .

and put logic of deciding href in method this

public string somemethodthatgethrefvalue() {     if(someval == true)          return "http://www.google.com";     else          return "http://www.yahoo.com";  } 

Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -