S
Simon
I have linkButton:
<asp:LinkButton ID="lnkAddMedia" runat="server" CausesValidation="false"
Text="ADD media"></asp:LinkButton>
In code behind file(c#) I add a client script to this link button:
lnkAddMedia.OnClientClick="vbscript:selectMedia('1')";
When page is rendered, the rendered code is:
<a onclick="vbscript:selectMedia('1');"
id="ctl00_ContentPlaceHolder1_lnkAddMedia"
href="javascript:__doPostBack('ctl00$ContentPlaceHolder1$lnkAddMedia','')">ADD
media</a>
and I get script error message on the page:
error: Expected end of statement
I guess that error is because of semicolon, which is added to my script:
vbscript:selectMedia('1');
(vbSCript doesn't have semicolons).
This semi colon was added automatically. How can I remove that?
One way is to put javascript instead of vbscript, but I preffer programming
in vbscript, because I have all program written in this language.
Thank you for your answers,
Simon
<asp:LinkButton ID="lnkAddMedia" runat="server" CausesValidation="false"
Text="ADD media"></asp:LinkButton>
In code behind file(c#) I add a client script to this link button:
lnkAddMedia.OnClientClick="vbscript:selectMedia('1')";
When page is rendered, the rendered code is:
<a onclick="vbscript:selectMedia('1');"
id="ctl00_ContentPlaceHolder1_lnkAddMedia"
href="javascript:__doPostBack('ctl00$ContentPlaceHolder1$lnkAddMedia','')">ADD
media</a>
and I get script error message on the page:
error: Expected end of statement
I guess that error is because of semicolon, which is added to my script:
vbscript:selectMedia('1');
(vbSCript doesn't have semicolons).
This semi colon was added automatically. How can I remove that?
One way is to put javascript instead of vbscript, but I preffer programming
in vbscript, because I have all program written in this language.
Thank you for your answers,
Simon