Hi All,
I want to stop postback if a certain value from a ddl is selected.
I've used VB to create a page whereby if a certain value from a ddl is selected then a hidden panel becomes visible. The problem is the likely answer to a majority of my ddl's is 'No' (or a no type response), however, even though the panel visibility remains false upon selecting No a postback still occurrs, the page refreshes and moves back to the top. I suppose this is a question with 2 possible solutions (or 2 questions rather)
1: Is there anyway of setting postback to false if selected value = No? A typical example of how my code appears is below
Protected Sub ddlYesNo_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ddlYesNo.SelectedIndexChanged
If ddlYesNo.SelectedValue = ("1") Then
panel3Days.Visible = True
PanelWhoWasInjured.Visible = True
...
Go to the complete details ...