Web Forms :: How To Allow Users To Enter Only Numbers And Values Only Upto 100
Dec 26, 2011
User will be entering % data in textbox. I am now using filter textbox extender to allow only numbers and .(ie decimal values). I also want the user to enter values from say 1 to 100 only.. How can i do this? If user wants to enter 0.5%?
I'm creating an "edit-your-profile-page" and I need to know how to keep the values that the users has enter between page loads. Error controls and stuff like that.
Most of my DAL functions use structures to pass the data back to the BLL and to the UI. I have got the try catch code now and it all works fine. I capture the exceptions in a seperate db table and it all works fine.I wanted to know how to pass the error up and what varable would be used to hold the error statusWhat I was think was - if I had a BO structure that was used to in the DAL and was populated and I wanted the error state up do I need to have a specific error field in the structure.
I want to allow numbers only to be allowed for a textbox and I already do it onkeydown event by allow only numbers and prevent ctrl+V but I have two problems: if I make right click then paste so any char can be entered and I want a solution without disable right click by oncontextmenu="return false;" if I drag and drop any text it will be entered
How can I validate a Boundfield in gridview that changes to textbox dynamically?the boundfield is
<asp:BoundField DataField="quantity" HeaderText="quantity" /> and it chenges to textbox in code belowI want only number (1,2,3,...) in it not text. protected void CartGrid_RowUpdating(object sender, GridViewUpdateEventArgs e) {
I have a situation where in I need to allow the users to enter email address of yahoo only in a free textbox.Can any one let me know how do I achieve this?For E.g: If the user supplies the email id as "xxxx@yahoo.com or xxx_xx@yahoo.com, or xxx.xx@yahoo.co.uk or xxxx_yy@yahoo.co.us", I will permit him for further processing. If the user inputs the email id as "xxx@gmail.com or xxx@rediffmail.com orxxx@someothermail.com" I should display an Error Message.
I'm creating a list of departments as linkbuttons, when clicked these linkbuttons bring up a list of people in that department in a gridview and thanks to some other peoples help this is working great. The next step for me is to get the phone number to display in the column next to their name, it sounds like an easy thing to do as I've pulled phone numbers accross from AD before but just can't get it to work now!The end result
I have a text box and users are entering na rather than supplying the specified data. How can explicitly not allow them to enter na in the field? I want to use an asp regularexpressionvalidator.
RegularExpresssoinValidator. I want to use it in a field where users enter URLs. I not only want to make sure that it's a valid URL but I also want to make sure that it's only those sites that are allowed.Let's say, I want my users to enter only YouTube or CNN URLs. How do I use the RegularExpressionValidator for this?
I am having trouble with something, my client wants to be able to hit <enter> as well as click the button on this page:-
[URL]
If you look at the Blue "Postcode search" and try searching for a nursery byb clicking the button you will see how it works. However then try doing the same but hitting <enter> and see what happens..
The front end html is as follows:-
PHP Code:
[code]....
I tried adding javascript so it would recognize the button and allow users to hit enter but this did not work.
I want to create a seach textbox for users to enter a few keywords in ,..and then my sql query will display the results......( basically a little search engine for my website)Ok so im thinking of using the Containstable with ranking on how close these keywords are to eachother... so the closer the keywords are to each other... the higher their ranking will be.... but I also want to seach for these keywords in 4 columns in one Datatable how can I do this
I need to let my users enter a variable length list of items into something that looks like a grid view (or a series of standard text boxes stacked vertically). Each item could be a few characters or a few hundred characters long, and I just want them to enter a "sentence", and then tab to the next row, and always having another blank one ready to go at the bottom of the list.
I don't want to save any data to my SQL Server DB until they enter the entire list and then click on a "save all" button. When they hit the "save all" button they will be given a preview screen where the data will be presented as standard HTML ordered list. If they confirm/save, then each row of the grid will then be saved as a separate row into my SQL Server database (with an index to remember the order).What ASP.Net (or Jquery/javascript) UI control would be the best to use in this situation? (i.e. just for the data entry part - the rest I got covered).
I'm writing a program that records time-in and time-out and I have a problem when trying to retrieve data for a specific date.In the table, the "timein" and "timeout" fields have format of "smalldatetime". To record the timein, I insert the system time (by using System.DateTime.Now) into the "timein" field.I want two types of searches.
1) Search records between a date range
2) Search records for a specific date
For example, First, I want to search if there are any records between 11/2/2010 and 12/1/2010. I will ask user to input "11/2/2010" as start date and "12/1/2010" as end date. I will use Convert.DateTime() methods to convert these two input before put them into SQL query like:
"SELECT * FROM timesheet WHERE timein BETWEEN Convert.DateTime(startdate) AND Convert.DateTime(enddate)"
The output results do not include the date 11/2/2010 and 12/1/2010. I get only the dates in between. I know that is the limitation of BETWEEN. I wonder if someone has a way to work around this limitation.
Secondly, I want to prompt users to enter a specific date like (11/2/2010) and search the table for rows match that criteria. I can't get this to work. I have tried "SELECT * from timesheet WHERE timein LIKE '%searchdate%'", "......timein = 'searchdate'" but none works.
(I'm using VS 2010 C# and SQL 2008 for this project)
I have take a datagrid view and now i want to update the records as the database is been normalized i need to enter the multiple rows at once. How you I convert the datagrid to enter the data so that it would be easy for me to update the records?
I have to create a text box where if user will enter something it should show the values from database like google shows.e.g If i press a it should display a if i have entered AJ it should show all the list which start from AJ.Same like google.
I have a requirement of sending 3000 Emails one by one with an attachment of around 100KB, I was using System.net.mail namespace with our company mail server.my program will send upto 360 mails after that it is not sending emails,and it is not giving any exception.what is the solution to my problem.
i am working on a product based website in which i have a product table with product names and prices, i have defined the datatype of price as "Money"
but the problem is it shows price upto 4 decimals everytime, how i can limit that upto 2 decimals only, on the webpage as well as in the table also in database ?
I am creating an application where the user can upload files upto 100mb into the database and retrieve them later. I used the asp.net uploald control. Looks like it can upload only files of size 4MB.
When you are entering an attribute value, what is the shortcut to jump out of the quoatation marks? It's a lot like hitting enter after you select an enum value for, say, a color or anything like that, that is also in quatations marks. When you hit enter, it fills in the value, jumps outside the quotes and lets you happily continue coding on your way. However, in instances where you are filling out, say, an id value, there is no Intellisense and hitting enter, tab, or whatever will not jump out of the quotes.
I have develope web application with dropdown menu style. All pages loaded into iframe which is include in master page, Master page have dropdown menus (ui,li) and iframe, according to selection of link page will get loaded into iframe using javascript.Now i want to dispaly breadcrump upto current page. how can i handle same thing in asp.net with iframe. Example :
ABC : DEF : GHI ============Main Menu abc ======== Child Menu def -> jkl======= Sub Child Menu mno pqr
So when i am on page "mno" breadcrums like ABC > def > mno When user again mouse over on def same sub child menu will get appear as we have dispaly on header. My all pages get open in iframe.as i have call javascript for all page links to set src of iframe.
At the first loading of my page, duration of PreRender takes upto 13 seconds. That page has basically a gridview control which bind to SqlServer query by SqlDataSource. When I execute query seperately, it takes only 0.02 second.
On the other hand, for the next loadings of same page by postback, duration of PreRender varies from 0.5 second to 3-4 seconds.
In addition to gridview, there are several dropdownlist, update panel, ImageButton in gridview. I use paging for Gridview.
Which strategy should i follow to increase performance of this page?
I would like to to make a UI with a panel of numbers, and when hovered above one of them ten the number becomes larger. something like that:
[URL]
I want that when I press a numbers it shows it's value in some other textbox. In which .NET technology is it possible to do it? Windows Forms? WPF? other?