Solved

IE Webcontrol toolbar

Posted on 2004-08-31
5
483 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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

708 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now