Solved

IE Webcontrol toolbar

Posted on 2004-08-31
5
492 Views
Last Modified: 2012-06-27
Any one know how to make a hylerlink using this control.

there is no hylerlink attribute and the onclick is always erroring out

                                    <iewc:Toolbar id="myToolbar" runat="server"
                                    BackColor="#FFFFFF" Width="70" Orientation="Horizontal"
                                    DefaultStyle="background:#EDF2FC;border:solid 1px #EDF2FC;font-size:8pt;"
                                    HoverStyle="background:#CCCCCC;border:solid 1px #cccccc;"
                                    SelectedStyle="background:#EEEEEE;border:solid 1px #cccccc;">
                                          <iewc:ToolbarButton onClick="doit()" Text="&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Home&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"  />                                          
                                          <iewc:ToolbarSeparator />
                                          <iewc:ToolbarButton   Text="&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Configurator&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" />
                                          <iewc:ToolbarSeparator />
                                          <iewc:ToolbarButton Text="&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Processor&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" />
                                                      </iewc:Toolbar>
0
Comment
Question by:Yog
  • 2
5 Comments
 
LVL 8

Expert Comment

by:shovavnik
ID: 11944177
Just a guess.

Try "javascript:doit()".

0
 
LVL 5

Author Comment

by:Yog
ID: 11945308
i had no luck

here is my entire code.

i am not getting what is wrong here

----------

<%@ Register TagPrefix="iewc"
Namespace="Microsoft.Web.UI.WebControls"
 Assembly="Microsoft.Web.UI.WebControls" %>
<%@ import namespace="Microsoft.Web.UI.WebControls" %>
<html>
      <head>
            <title>toolbar</title>
            <style>
            BODY
            {
                  font-family:verdana,arial,helvetica;
                  margin:0;
            }
            </style>
            <script language="javascript">
                  function doit(){
                        document.WebForm2.action="config_tree.aspx";
                        document.WebForm2.submit();
                  }
            </script>
      </head>
      <body MS_POSITIONING="GridLayout">
            <form id="WebForm2" method="post" runat="server">

                                    <iewc:Toolbar id="myToolbar" runat="server"
                                    BackColor="#FFFFFF" Width="70" Orientation="Horizontal"
                                    DefaultStyle="background:#EDF2FC;border:solid 1px #EDF2FC;font-size:8pt;"
                                    HoverStyle="background:#CCCCCC;border:solid 1px #cccccc;"
                                    SelectedStyle="background:#EEEEEE;border:solid 1px #cccccc;">
                                          <iewc:ToolbarButton onClick="javascript:doit()" Text="&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Home&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"  />                                          
                                          <iewc:ToolbarSeparator />
                                          <iewc:ToolbarButton   Text="&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Configurator&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" />
                                          <iewc:ToolbarSeparator />
                                          <iewc:ToolbarButton Text="&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Processor&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" />
                                          <iewc:ToolbarSeparator />
                                          
                                    </iewc:Toolbar>


            </form>
      </body>
</html>

0
 
LVL 8

Accepted Solution

by:
shovavnik earned 50 total points
ID: 11945351
Try in the Code Behind to set the attribute.  Your code will look something like this.  I'm not sure what the name of the toolbar buttons collection si, so use IntelliSense.

myToolbar.ToolbarButtons[ 0 ].Attributes[ "onclick" ] = "doit()"
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question