The only solution I'v found was to use a script in Jscript
like this:
Button1.Attribu tes.Add("onclic k","javascript: myscript(1)");
and the code of Myscript is:
<script language="JavaS cript">
function myscript(i)
{
parent.frames
(2).location.hr ef="http://..../mypage.aspx?arg ument1="+i
}
</script>
But there is some issues with this method.
- I can only execute a my script when an "onclick" event
happens... And I'd like to use it with a
SelectedIndexCh anged event.
- It's not easy to change the argument
in "javascript:mys cript(1)", since it is a constant string.
If anybody knows a way to do this only in C#, it would be
cool.
like this:
Button1.Attribu tes.Add("onclic k","javascript: myscript(1)");
and the code of Myscript is:
<script language="JavaS cript">
function myscript(i)
{
parent.frames
(2).location.hr ef="http://..../mypage.aspx?arg ument1="+i
}
</script>
But there is some issues with this method.
- I can only execute a my script when an "onclick" event
happens... And I'd like to use it with a
SelectedIndexCh anged event.
- It's not easy to change the argument
in "javascript:mys cript(1)", since it is a constant string.
If anybody knows a way to do this only in C#, it would be
cool.