I have an asp button in default.aspx
:
<asp:Button ID="Button1" runat="server" Text="Button" />
Additionally, there is a procedure in default.aspx.vb
:
Protected Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Panel1.Controls.Add(New LiteralControl(Date.Now))
End Sub
The instructor has presented me with a challenge to achieve the same function (displaying the current date upon clicking the button), without causing a postback and without utilizing any JavaScript code. While I could choose to implement a JavaScript solution using OnClientClick="return false"
, I want to explore alternative approaches.