J
John Owens
I use in Render( HtmlTextWriter output) :
//--------------------------------------------------------------------------
output.WriteBeginTag( "a" );
if( ID != null )
output.WriteAttribute( "id", ClientID );
output.WriteAttribute( "href", "javascript:" +
Page.GetPostBackEventReference( this ) );
output.Write( HtmlTextWriter.TagRightChar );
if( Text.Length > 0 )
output.Write( Text );
output.WriteEndTag( "a" );
//--------------------------------------------------------------------------
-------------------------
This creates the HTML:
<a id="WebLinkButtonCtrl1"
href="javascript:__doPostBack('WebLinkButtonCtrl1','')">Type something
here</a>
The problem is when I press the button as it gives a:
Microsoft JScript runtime error: Object expected
Does anyone have any ideas as how to solve this as it appears to be
happening whenever I use
output.WriteAttribute( "href", "javascript:" +
Page.GetPostBackEventReference( this ) );
even when they are copied from samples etc.
Thanks
John.
//--------------------------------------------------------------------------
output.WriteBeginTag( "a" );
if( ID != null )
output.WriteAttribute( "id", ClientID );
output.WriteAttribute( "href", "javascript:" +
Page.GetPostBackEventReference( this ) );
output.Write( HtmlTextWriter.TagRightChar );
if( Text.Length > 0 )
output.Write( Text );
output.WriteEndTag( "a" );
//--------------------------------------------------------------------------
-------------------------
This creates the HTML:
<a id="WebLinkButtonCtrl1"
href="javascript:__doPostBack('WebLinkButtonCtrl1','')">Type something
here</a>
The problem is when I press the button as it gives a:
Microsoft JScript runtime error: Object expected
Does anyone have any ideas as how to solve this as it appears to be
happening whenever I use
output.WriteAttribute( "href", "javascript:" +
Page.GetPostBackEventReference( this ) );
even when they are copied from samples etc.
Thanks
John.