I am using a custom validator for validating two text boxes simultaneously. The scenario is if one text box I filled, the other has to be filled too if not both can be left unfilled. The code for the custom validator is ,
[Code]....
I can set the focus to the text box that is unfilled ie either txtbox1 or txtbox2. In custom validator I can setfocusonerror to only one field. i tried to put the focus statement in the javascript but could not get the result.
I'm using a code I got from CodeProject [URL] about a validator that can monitor 3 form controls. I pasted it to my site, changed it to suite my parameters but seem to encounter a situation that can't satisfy my desire: Instead of making sure that all the 3 DropDownLists are filled without their default value, the validator cares only if at least one has been filled, and if so, he can call it a day. look at this code at tell me what am I doing wrong?
I have a form containing both CustomValidators and RequiredFieldValidators. The Custom Validation doesn't fire until all of the requiredFieldValidators have passed. Can someone tell me how to get them to validate at the same time? I want all the validation messages to show when no data is input.
Is there a way I can override the default scrolling using when SetFocusOnError = true? Right now it pops the user up the page so that the top of the control is at (0,0). The problem is that our labels are above the controls, so the user can't see the label without scrolling up a little more. I'd like to make it center the control vertically instead, and ideally even do a nice smooth jQuery slide up. I tried like this but it didn't work (never gets fired):
function WebForm_AutoFocus(obj) { elem = document.getElementById(obj).scrollTop() - 200; //Go to 200px above where the element is $('html, body').animate({ scrollTop: elem }, 350) }
I have some validators on my webpage and I have some other functionalities as well.I am calling a Javascript function on my Submit Button click to set focus on some Validators by setting "SetFocusOnError" to true in that javascript. I need to do this on submit button click only as I have some other functionality on form which is also using PostBack so I have set "SetFocusOnError" to False for that validator by default.
But somehow, its showing that "SetFocusOnError" is set to true through javascript but its not setting focus, so it seems like its not working.Here is my javascript code inside my Javascript function which I call on my submit button click and return true or false.
[Code]....
Validators are working perfect but the only problem is that its not setting focus on Validator if I set like this through JavaScript.
Maybe im doing it wrong, but all the examples i have found online seem pretty simple and straight forward. I have my validation controls all setup to SetFocusOnError="true", but if i complete my page and leave the very last textbox empty and submit, since its required the page fails, but the focus is not set on that field, even though its the only one that failed validation.
We are about to release beta version of our website. Lately we have seen that developers have not set setfocusonerror on any of the validaor controls used.We have to set this property.Now, one solution is to open every page and put this property in place. I am looking for some othe way like some configuration in web.config or some other quick solution.I have usercontrols and pages. Page derive from base page.
URL....I use this one as my login, and I addes hyperlink for Forgot Password. But why I can't access the FORGOT PASSWORD.aspx for every time I click it. And when I login it redirects t Forgot Password.How I can access it without logging in?
In our application we are using forms authentication, we have given defaulturl also in the config file. But the problem is that it is not getting redirected to the default url when the session timeout is occuring.
I have been presented with numerous word and excel docs. The goal is to put them online and bind to a database for the fields and also to store data for easy searching and reporting.
Has anyone done anything like this before?
I know the easy solution would be to create a database table for each particula form and also an ASP.net page for each form.
But then there are problems like printing and correct formating so it fits on the page, spaning multiple pages and so on.
And also is there any advice on how to write to PDF straight from the page?
I have a treeview named Treeview1 with checkboxes. I want the child checkboxes to be checked if parent is checked.
I am trying to use a simple code that I found on msdn :
[Code]....
For some reasons I got this error and I really dont understand why:
Type 'System.Windows.Forms.TreeViewEventArgs' is not defined.
warning BC40056: Namespace or type specified in the Imports 'System.Windows.Forms' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases.
Really getting better with VS, but I've mostly been displaying data. I'm on a new project and now and I have a lot of data entry forms to create. I created a form to enter data into an access db and got it working. I thought it would be cool to add an edit button that fired a gridview to load on the same page, under my original forms, so that that they could load up the data and edit or delete mistakes. But when I try to update the gridview, it also tries to post the original forms (text boxes), which fail because there is no data in them, and I get an error.
What is the proper way to handle this in asp.net? I'm sure this is kind of a common issue. I've done some searching, but the search terms, like forms and gridview, are kind of generic and I'm not coming up with anything useful. I just need a more experienced person to point me in the right direction and I'll get it figured out.
My images show up find in design time, and if I have logged in and go back to the page, they show, but upon initial login,they aren't visible. What do I need to do?
In windows forms, there is the "show data sources" under the "data" menu item, and I love it because I can drag and drop the fields I need onto the form and it makes the control automatically.In web forms however, this option isn't there. Why? I try to drag and drop fields from the "server explorer" but it generates grids, I don't want grids I just want to drag and drop the text boxes or checkboxes etc.
Form1 is for the administrator. It has 5 fields. Field1 has a value for which the other values give details about it. This 5 fields are stored in a table. Form2 is for a user and its a data entry form. This forms has 12 fields. Each label in the form2 corresponds to the value of Field1 in form1. If suppose the admin fields 10 times the form1. The 10 labels of form2 are filled with values of field each time. The above is what I want to achieve. Also the two text box corresponding to the remaining two labels should be disabled for user.
I create a windows forms control library project, And build it. then i want it's dll to my web project, for this i used object tag which can display it on page. I made reference of dll to my project.did the following coding.
Below is the error whil i am developing the windows forms. it is coming while login in to the forms. Request For The Permission Of Type 'System.Data.SqlClient.SqlClientPermission, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
I'm building a web page that is going to make extensive use of User Controls. Using "LoadControl" it will have one of about 20 different User Controls loaded at any one time. Each User Control is somewhat different, gathering different sorts of data.
I've already built the mechanism to load the User Control and pass strongly typed data to it. But now I'm tackling the part of returning the user data to the Parent Form. I can think of several possible approaches to take but wanted to reach out to the community to learn what the best practice for doing this is.
I am using the ASPNET_Captcha control for my login page. It works fine. However when i implement the forms authentication, the catcha image does not appear.
Do i need the location section in the web.config file? If yes can you share the details for the same.
what are the ways of handling multiple web forms data for saving into database after last form or editing data and saving back to database after last form is submitted.Previously I have used wizard & panels in a single form and also has cached data from multiple form to save when last form is submitted. Are there some better way to handle multiple web forms data for saving and editing ?