Last post May 14, 2019 10:56 AM by E.RU
May 14, 2019 08:02 AM|E.RU|LINK
If there is a query string at the end of my http link I dont want to display a textbox with a button
(the manual way of executing my code)
If the query string is present I would like Me.Button1_Click(sender, New EventArgs()) to be fired also
I have wrapped my button in a panel as I thought this would help. this is the code I have tried with the textbox and button being got rid of but the button event
doesnt fire, any help would be great !!!
Private Sub _Defaultsql_Load(sender As Object, e As EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
If Not String.IsNullOrEmpty(Request.QueryString("Code")) Then
Me.Panel1.Visible = False '--fire button event here
May 14, 2019 10:39 AM|mgebhard|LINK
This is a very simply code refactor. Mode the click event handler body into a new method. Then simply call the new method from the event handlers and the _DefaultSql_Load event.
May 14, 2019 10:53 AM|E.RU|LINK
Thank you for your reply I have tried this and I just need to let the code typed in in the query string = fill textbox 1 how do i code this ?
May 14, 2019 10:56 AM|E.RU|LINK
never mind I got it working thanks so much.
Me.TextBox1.Text = Request.QueryString("Code")