Chodici Mrkev wrote: MY PROBLEM: WHEN I CLICK SUBMIT BUTTON, IT CALLS PAGE_LOAD FIRST Yes, that is the correct operation. You can use the IsPostBack[^] property on the Page class (which you are inheriting from) to determine if this is the first time the page is loaded, or it is being loaded because of a postback. If you have not turned the ViewState off, then your buttons and labels will not need to be updated again in the Page_Load method. So, you could possible re-write your page load as:
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
If Not IsPostBack
Select Case Request.QueryString("action")
Case ""
lblAction.Text = "Registrace nového uživatele"
btnSubmit.Text = "Odeslat"
Case "new"
lblAction.Text = "Registrace nového uživatele"
btnSubmit.Text = "Odeslat"
Case "edit"
lblAction.Text = "Úprava nastavení uživatele"
btnSubmit.Text = "Uložit"
GetUserDetails()
End Select
End If
' Remainer of method omitted from the original post
DISCLAIMER: I am not a VB.NET developer, there may be syntax errors - but the logic should be apparent.
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell Not getting the response you want from a question asked in an online forum: How to Ask Questions the Smart Way!