Solved

IE Webcontrol toolbar

Posted on 2004-08-31
5
498 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

627 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