---
title: "Visual Web Dev/ASP.net VB Button click"  
description: "Visual Web Dev/ASP.net VB Button click"  
author: "Anonymous User"  
published: 2013-06-11  
updated: 2013-06-12  
canonical: https://www.mindstick.com/forum/1024/visual-web-dev-asp-dot-net-vb-button-click  
category: "vb.net"  
tags: ["vb.net"]  
reading_time: 2 minutes  

---

# Visual Web Dev/ASP.net VB Button click

Hi Guys\
There is a [problem](https://yourviews.mindstick.com/view/81399/tackling-the-problem-of-unemployment-during-corona-pandemic) with [button click](https://www.mindstick.com/forum/790/form-gets-submiited-twice-on-button-click) [event](https://www.mindstick.com/articles/167719/marquee-hire-benefits-of-event-lighting-hire-london)\
**my line of [code](https://yourviews.mindstick.com/view/85458/alan-turing-the-mastermind-behind-cracking-the-enigma-code-during-world-war-ii) as following** \

```
        <asp:Image ID="Image1" runat="server" Height="57px" ImageUrl="~/img/logo.png"             Width="36px" />        <strong>&nbsp;Test</strong> System </h1>            <form action="" enctype="multipart/form-data" class="pcss3f">            <header><asp:Label ID="lblOverview" runat="server" Text=""></asp:Label></header>                <section class="state-normal" style="text-align:center">                <button type="button" onclick="window.location = 'AddItem.aspx'">Add Work Item</button>                <button type="button" id="btnMyWork" name="btnMyWork" onclientclick="btnMyWork_Click" runat="server">My Work Items</button>                <button type="button">Database Stats</button>                <br>                </br>                <asp:Label ID="lblWhoAmI" runat="server" Text=""></asp:Label>                </section><footer><asp:Label ID="lblWhoAmI2" runat="server" Text=""></asp:Label></footer>    </form>
```

\
The button I'm referring to is this:\

```
<button type="button" id="btnMyWork" name="btnMyWork" onclientclick="btnMyWork_Click" runat="server">My Work Items</button>
```

\
And here's the VB I'm [trying](https://answers.mindstick.com/qa/93698/6-mistakes-couples-are-trying-to-save-money) to get it to run:\

```
Protected Sub btnMyWork_Click()        lblOverview.Text = "Success"        lblWhoAmI.Text = "Success"    End Sub
```

\
But when I click it, nothing happens. I've tried adding a click [handler](https://www.mindstick.com/forum/33532/handler-pagehandlerfactory-integrated-has-a-bad-module-managedpipelinehandler-in-its-module-list) in the aspx.vb code but the ".click" won't show in the Intelligent.\
**Thanks**

## Replies

### Reply by AVADHESH PATEL

Hi Pravesh,\
That is a html [button](https://www.mindstick.com/articles/63/how-to-add-button-in-datagridview-in-csharp-dot-net). You need to use the ASP button control to fire the **OnClick** event. Something like below:\
**<asp:Button id="btnMyWork" onclick="btnMyWork_Click" runat="server" Text="My Work Items" />**\
Try it and tell us.


---

Original Source: https://www.mindstick.com/forum/1024/visual-web-dev-asp-dot-net-vb-button-click

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
