Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Integrating javascript in a vb.net webform
Message
General information
Forum:
ASP.NET
Category:
Web forms
Miscellaneous
Thread ID:
00758627
Message ID:
00758881
Views:
19
This message has been marked as a message which has helped to the initial question of the thread.
Robert,

You are using an ASP.NET control which expects all code to be executed on the server and not the client. Just use a standard HTML control to perform what you are looking for.
<a id="LinkButton1" href="javascript:openBuchen()" style="Z-INDEX: 105; LEFT: 48px; POSITION: absolute; TOP: 56px">LinkButton</a>
>Hi!
>
>I've a problem. I have an asp:linkbutton and want to use the onclick-command for opening a new webform in a frame.
>see example below, the id of the linkbutton is linkbutton2 and to me everything seems alright. but if I preview this page I get an errormessage that 'openBuchen() is no member of ASP.Menu_aspx'.
>
><%@ Page Language="vb" AutoEventWireup="false" Codebehind="Menu.aspx.vb" Inherits="Kassabuch.Menu"  
><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
><HTML>
><HEAD>
><meta content="Visual Basic 7.0" name="CODE_LANGUAGE">
><meta content="JavaScript" name="vs_defaultClientScript">
><meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
><script language="javascript" id="clientEventHandlersJS">
><!--
    function openBuchen()
	{
	window.open("buchen.aspx","mainframe");
	}
//-->
></script>
></HEAD>
><body language="javascript" MS_POSITIONING="GridLayout">
><form id="Form1" method="post" runat="server">
>  <asp:linkbutton id="LinkButton2" style="Z-INDEX: 105; LEFT: 48px; POSITION: absolute; TOP: 56px" runat="server" OnClick=openBuchen()>Buchen</asp:linkbutton>
></form>
></body>
></HTML>
>
>
>Thanks for help!
-----------------------------------------

Cathi Gero, CPA
Prenia Software & Consulting Services
Microsoft C# / .NET MVP
Mere Mortals for .NET MVP
cgero@prenia.com
www.prenia.com
Weblog: blogs.prenia.com/cathi
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform