Last post Mar 26, 2018 02:43 PM by VIKTORW
Mar 25, 2018 03:28 PM|VIKTORW|LINK
I currently support a vb.net web forms application, however my experience is more in client server, so I have some questions in regards to an UpdatePanel, Panel control and to set the Focus() to a control.
My need is to set Focus() to a control for an empty required field. The Focus() function does this for controls, but because the Command Button (CB) controls and FileUpload are outside of the UpdatePanel, when submitting the form, it sets itself at the bottom
of the page to the CB control.
to upload a file, property .HASFILE is false.
-required field controls within the UpdatePanel
I cannot reposition the panels, must follow document panel and then the buttons.
Not being strong in the web, can anyone please provide some insight on this?
Any help is much appreciated.
VS2015-VB.NET webform, Windows 10, SQL Server 2008 R2
Mar 25, 2018 06:49 PM|Rebin.O.Q|LINK
What are required controls in side update panel ? are you use a <%= ControlID.ClientID %> ?
<%= ControlID.ClientID %> ?
document.getElementById('<%= ControlID.ClientID %>').focus();
Mar 26, 2018 02:43 PM|VIKTORW|LINK
All controls use Id ex. <asp:DropDownList ID="ddlTest"........
Would I have to create a JS function in the pagebehind aspx page and then when the button is clicked, call the JS function to do a check on all req. fields?