troubleshooting Question button click event in Site.Master

Avatar of Murray Brown
Murray BrownFlag for United Kingdom of Great Britain and Northern Ireland asked on
ASP.NETVisual Basic.NET
2 Comments1 Solution90 ViewsLast Modified:
In my Site Master whose markup code is shown below I have the following button
     <button class="btn btn-primary" ID="btnGetStarted">Get started</button>
I want to run code behind this but when I double click on it it does not create a click event

<%@ Master Language="VB" AutoEventWireup="true" CodeBehind="Site.master.vb" Inherits="Office2Web.SiteMaster" %>

<!DOCTYPE html>

<html lang="en">
<head runat="server">
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title><%: Page.Title %> Office2Web Microsoft Office and Web Solutions</title>

    <asp:PlaceHolder runat="server">
        <%: Scripts.Render("~/bundles/modernizr") %>

    <webopt:bundlereference runat="server" path="~/Content/css" />
    <link href="~/favicon.ico" rel="shortcut icon" type="image/x-icon" />
    <link href=",500,700&display=swap" rel="stylesheet">
    <form runat="server">
        <asp:ScriptManager runat="server">
                <%--To learn more about bundling scripts in ScriptManager see --%>
                <%--Framework Scripts--%>
                <asp:ScriptReference Name="MsAjaxBundle" />
                <asp:ScriptReference Name="jquery" />
                <asp:ScriptReference Name="bootstrap" />
                <asp:ScriptReference Name="WebForms.js" Assembly="System.Web" Path="~/Scripts/WebForms/WebForms.js" />
                <asp:ScriptReference Name="WebUIValidation.js" Assembly="System.Web" Path="~/Scripts/WebForms/WebUIValidation.js" />
                <asp:ScriptReference Name="MenuStandards.js" Assembly="System.Web" Path="~/Scripts/WebForms/MenuStandards.js" />
                <asp:ScriptReference Name="GridView.js" Assembly="System.Web" Path="~/Scripts/WebForms/GridView.js" />
                <asp:ScriptReference Name="DetailsView.js" Assembly="System.Web" Path="~/Scripts/WebForms/DetailsView.js" />
                <asp:ScriptReference Name="TreeView.js" Assembly="System.Web" Path="~/Scripts/WebForms/TreeView.js" />
                <asp:ScriptReference Name="WebParts.js" Assembly="System.Web" Path="~/Scripts/WebForms/WebParts.js" />
                <asp:ScriptReference Name="Focus.js" Assembly="System.Web" Path="~/Scripts/WebForms/Focus.js" />
                <asp:ScriptReference Name="WebFormsBundle" />
                <%--Site Scripts--%>

        <!-- Navbar -->
        <nav class="navbar navbar-default">
            <div class="container">
                <div class="navbar-header">
                    <a class="navbar-brand" runat="server" href="~/">
                        <img src="Resources/images/logo/office2web-logo.svg" alt="The Office2Web logo"/>
                    <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#main-menu-collapse" aria-expanded="false">
                        <span class="sr-only">Toggle navigation</span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                <div class="collapse navbar-collapse" id="main-menu-collapse">
                    <ul class="nav navbar-nav navbar-right">
                        <li><a runat="server" href="~/">Home</a></li>
                        <li><a runat="server" href="~/About">About</a></li>
                        <li class="dropdown">
                            <a class="dropdown-toggle" data-toggle="dropdown" href="#">Services
                            <span class="caret"></span></a>
                            <ul class="dropdown-menu">
                                <li><a runat="server" href="~/Microsoft_Office_Solutions">Microsoft Office Solutions</a></li>
                                <li><a runat="server" href="~/Web_Applications">Web Applications</a></li>
                                <li><a runat="server" href="~/Combined_Web_And_Office">Combined Web & Office</a></li>
                                <li><a runat="server" href="~/Access_Services">Access Services</a></li>
                        <li><a runat="server" href="~/Contact">Contact</a></li>

        <script type="text/javascript">
            (function ($) {
                $(document).ready(function () {
                    $('ul.dropdown-menu [data-toggle=dropdown]').on('click', function (event) {

        <!-- Content -->
        <div class="container-fluid p-0">
            <asp:ContentPlaceHolder ID="MainContent" runat="server"></asp:ContentPlaceHolder>

        <!-- Footer -->
        <footer class="footer">
            <div class="container">
                <div class="footer-form">
                    <div class="row">
                        <div class="col-sm-12 col-md-6">
                            <h2>Get a free consultation</h2>
                                          <p>Initial consultation is free. Thereafter charges apply.</p>
                        <div class="col-sm-12 col-md-4">
                            <div class="form-group">
                                <input type="email" placeholder="Enter your email address" class="form-control" />
                        <div class="col-sm-12 col-md-2">
                            <button class="btn btn-primary" ID="btnGetStarted">Get started</button>
                <hr />
                <div class="footer-bottom">
                    <div class="row">
                        <div class="col-sm-12 col-md-6">
                            <p>&copy; <%: DateTime.Now.Year %> - Office2Web Pty Ltd</p>
Paul MacDonald
Director, Information Systems

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 2 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros