Created
July 21, 2017 20:39
-
-
Save NPS-ARCN-CAKN/296619b6437a480159b037984b8ecc4d to your computer and use it in GitHub Desktop.
ASP .Net VB DetailsForm - Set DefaultMode on Page_Load using QueryString parameter
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load | |
If Request.Params("CampaignID") = Nothing Then | |
'There is no record to edit, set the form to Insert mode | |
Me.DetailsView1.DefaultMode = DetailsViewMode.Insert | |
Else | |
'User requested a Campaign record to view | |
Me.DetailsView1.DefaultMode = DetailsViewMode.ReadOnly | |
End If | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment