C# .NET - textbox property

Asked By madhu radha
07-Nov-09 06:51 AM

hi all,

  i want a textbox for cost purpose which should accept  dot before last two digits  

re  re

07-Nov-09 08:47 AM

u can use this

Listing 1 - Overriding the KeyPress event

        protected override void OnKeyPress(KeyPressEventArgs e)
        {
            if (e.KeyChar >= '0' && e.KeyChar <= '9')
            {
               
// move all digits over to the left
                Shift(); 
                // make sure there is a prompt to replace
                int index = this.Text.LastIndexOf(PromptChar);
                if (index >= 0)
                {
                   
// insert the character typed into the last prompt character of the Text string
                    this.Text = this.Text.Substring(0, index) + e.KeyChar + this.Text.Substring(index);
                }
           }
            base.OnKeyPress(e);
        }

http://www.dotnetheaven.com/Uploadfile/mgold/MaskedCurrencyTextBox02252006005553AM/MaskedCurrencyTextBox.aspx

http://www.c-sharpcorner.com/UploadFile/jibinpan/MaskedTextBoxControl11302005051817AM/MaskedTextBoxControl.aspx

Use MaskedTextBox  Use MaskedTextBox

07-Nov-09 08:57 AM
Use the MaskedTextBox Control - http://msdn.microsoft.com/en-us/library/ka7h9fze.aspx

re  re

07-Nov-09 09:56 AM

if u are using latest version of vs.net 3.0 then there are one mask property of textbox , where u can set for input format as

MaskedTextBox.Mask = "####.##"

source is here http://msdn.microsoft.com/en-us/library/system.windows.forms.maskedtextbox.mask.aspx

RegularExpressionValidator  RegularExpressionValidator
07-Nov-09 11:43 PM

You can use the RegularExpressionValidator for your TextBox.  Here's a link to know more about the Regular Expression Validator:

http://msdn.microsoft.com/en-us/library/ms998267.aspx

From that link, you can use this as your validator: ^\d+(\.\d\d)?$

Regards,
http://www.sql-server-helper.com/sql-server-2008/import-export-unknown-column-type-geography-geometry.aspx

Create New Account
help
choosen the Blog post from here This means the installation should be on a single server as Domain Controller , as MS SQL database server and as MOSS2007 server farm. Only one uses should be used. Thats what I have done, I followed the I am reading the logfiles placed under "c: \ program files \ common files \ microsoft shared \ web server extensions \ 12 \ logs". I don't find any relavant information regarding authentication or what else Anmeldung.' Source: '.Net SqlClient Data Provider' Number: 4060 State: 1 Class: 11 Procedure: '' LineNumber: 65536 Server: 'd-it5-sptest-dc' 03 / 04 / 2010 13:53:11.35 OWSTIMER.EXE (0x0980) 0x0988 spadmin'.' Source: '.Net SqlClient Data Provider' Number: 18456 State: 1 Class: 14 Procedure: '' LineNumber: 65536 Server: 'd-it5-sptest-dc' 03 / 04 / 2010 13:53:11.37 OWSTIMER.EXE (0x0980) 0x0988 Windows SharePoint Services Database 6y63 Critical SQL Database 'SharePoint_07_Config' on SQL Server instance 'd-it5-sptest-dc' not found. Additional error information
There is an error like Error :The project could not be deployed to the 'localhost' server because of the following connectivity problems : A connection cannot be made. Ensure that the server is running. To verify or update the name of the target server, right-click on the project in Solution Explorer, select Project Properties, click on the Deployment tab, and then enter the name of the server. i m not able to deploy. Plz tell me wht are the configuration of this http: / / msdn.microsoft.com / en-us / library / ms175672.aspx For cube building, you can use SQL Server 2000 Analysis Services, SQL Server 2005 Analysis Services, or SQL Server 2008 Analysis Services. This article describes requirements for using
Any one send frequently asked Important questions in C# .Net, ADO .Net, Asp .Net and Sql Server. . . . . . . . tx in Advance. . . . . . Hi, Find this. . (B)What is an IL? (B)What is a objects in Remoting? (A) What are the ways in which client can create object on server in CAO model? (A) Are CAO stateful in nature? (A) To create objects in CAO page ? (I) Can we post and access view state in another application? (I) What is SQL Cache Dependency in ASP.NET 2.0? (I) How do we enable SQL Cache Dependency in ASP.NET 2.0? (I) What is Post Cache substitution? (I) Why Config”? (B) What is a SESSION and APPLICATION object? (A) What is the difference between ‘Server.Transfer’ and ‘response. Redirect’ ? (A)What is the difference between Authentication and authorization? (I) what proper? (A) If client side validation is enabled in your Web page, does that mean server side code is not run. (A)Which JavaScript file is referenced for validating the validators A)What is the use of <%@ page aspcompat = true %> attribute? B) Explain the differences between Server-side and Client-side code? (I)Can you explain Forms authentication in detail? (A)How
attempted to be installed. [08 / 10 / 11, 14:26:01] VS70pgui: [2] DepCheck indicates Microsoft SQL Server Compact 3.5 SP2 (x86) ENU was not attempted to be installed. [08 / 10 / 11, 14:26:01] VS70pgui: [2] DepCheck indicates Visual Studio 2010 Tools for SQL Server Compact 3.5 SP2 ENU was not attempted to be installed. [08 / 10 / 11, 14 attempted to be installed. [08 / 10 / 11, 14:26:02] VS70pgui: [2] DepCheck indicates Microsoft SQL Publishing Wizard 1.4 was not attempted to be installed. [08 / 10 / 11, 14:26:02] VS70pgui: [2] DepCheck indicates Microsoft SQL Server System CLR Types was not attempted to be installed. [08 / 10 / 11, 14:26:02 VS70pgui: [2] DepCheck indicates Microsoft SQL Server 2008 R2 Management Objects was not attempted to be installed. [08 / 10 / 11, 14