I have added a button to allow the user to validate the URL they enter for the repository item on the Form page (Form.html,ascx,ascx.vb) using the following code. The problem I'm having is that the page validation is requiring that all fields be filled in prior to being able to test the URL. I like the validation and would like it to run when I press the upload button but not when I'm attempting to test the URL, it just makes for a bad flow in the UI. Any suggestions?
------------------------- In the create input form sub---------------------
Dim objButton As New Button"__TESTTRUEURL"
objButton.Text = oRepositoryBusinessController.GetSkinAttribute(xmlDoc,
objButton.CssClass = oRepositoryBusinessController.GetSkinAttribute(xmlDoc,
objButton.CommandName =
"TESTTRUEURL", "Text", Localization.GetString("TestTrueURL", oRepositoryBusinessController.LocalResourceFile))"TESTTRUEURL", "CssClass", "normal")"TestTrueURL"
objButton.EnableViewState =
True
objButton.ToolTip = oRepositoryBusinessController.GetSkinAttribute(xmlDoc,
PlaceHolder.Controls.Add(objButton)
----------------------------------------
Private Sub btnTestTrueURL_Click(ByVal sender As Object, ByVal e As System.EventArgs)Dim TrueURLField As TextBox = PlaceHolder.FindControl("__TRUEURL")If Not (TrueURLField.Text.ToString() = vbNullString) Then
Response.Write(
Response.Write(
Response.Write(
"<script>" & vbCrLf)"window.open('" & TrueURLField.Text.ToString() & "');" & vbCrLf)"</script>")End If
End Sub
"TESTTRUEURL", "ToolTip", Localization.GetString("TestTrueURLToolTip", oRepositoryBusinessController.LocalResourceFile))AddHandler objButton.Click, AddressOf btnTestTrueURL_Click
objButton.ID =