Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    ASP.NET


Advertisements:










C# - Separate Long Numbers By 3 Digits?


Is there a easy way to transform 1000000 in 1.000.000? A regex or string format in asp.net, c#


View 5 Replies (Posted: May 17 10 at 9:59)

Sponsored Links:

Related Forum Messages For ASP.NET category:
Web Forms :: Regular Expression Validator For Numbers, Comma, And 5 Digits Behind Decimal
I am using regular expression validator for Numbers, Comma andDecimal.. The expression is given below.

mNumValidator.ValidationExpression = "^(d|,)*.?d*$"

Now I would like to have 5 digits behind decimal.

Posted: May 05, 2010 06:23 PM

View 7 Replies!   View Related
Using Regular Expression Text Box Should Accept 1 Or 2 Or 3 Or 4 Or 5 Max Digits Numbers Only Restrict Decimal Part?
I need to validate the text box at server side by using regular exp which should accept 1 or 2 or 3 or 4 or 5 digits numbers .Need to restrict decimal part.

Ex: 1 or 23 or 455 or 5643 or 45667 --Should accept.

1.3, .2, 33.3 , 444.55 ,5555.99 -- should not accept.

Posted: Jan 12 at 11:19

View 3 Replies!   View Related
Separate Numbers - Each Three From Right?
How Can i separate Numbers (each 3 number from right)? For example User typed 3456543132 and in out put i want to have : 3,456,543,132 or in input we have 1320 in output we have 1,320

Posted: Apr 24, 2009 12:03 PM

View 4 Replies!   View Related
.net - Create Separate Textbox For Numbers And String Using C# Code?
I want to create separate textbox for numbers and string using c# code. I should not use jquery or javascript.

Condition:

Numeric Textbox: It should not allow characters, special characters.
String Textbox: Should not allow numbers, Special characters.

Posted: Oct 28 10 at 5:38

View 3 Replies!   View Related
Separate Service For Processing Long Running Tasks?
I would like to makea windows service. whenever the user of my ASP.NET application has to do a time-consuming task, the IIS would give the task to the service which will return a token(a temporary name for the task) and in the background the service would do the task. At anytime, the user would see the status of his/her task which would be either pending in queue, processing, or completed. The service would do a fixed number of jobs in parallel, and would keep a queue for the next-incoming tasks. In addition there would be a WinForms application for system administrator that would allow adding special ADMIn tasks such as "Clean orphaned files" or "archive data of inactive users".

Can you point me to something that can jump start me on this as a whole concept - I know I can google for windows services and I am able to do it myself from scratch but time is of the Essence so maybe you know of something that is already there and i can use block to build out of.

Posted: Jan 12 at 22:07

View 1 Replies!   View Related
Long Running HTTP Process - How To Put In Separate Process
I know that similar questions have been asked all over the place, but I'm having trouble finding one that relates directly to what I'm after.

I have a website where a user uploads a data file, then that file is transformed and imported into SQL. The file could be up to 50mb in size, and some times this process can take 30 minutes or sometimes even longer.

I realise I need to palm off the actual work to another process, and poll that process on the web page. I'm wondering what the best approach would be though? Being a web developer by trade, I'm finding all this new Windows Service stuff a bit confusing, and I just wanted somewhere to start.

So:

Can I do / should I being doing this with a windows service? if so, how?

Should I use WCF? If this runs under IIS, will I have problems with aspnet_wp.exe recycling and timing out my process?

clarifications

The data is imported into sql, there's no file distribution taking place.

If there is a failure, it absolutely MUST be reported to the user. The web page will poll every, lets say, 5 seconds, from the time the async task begins, to get the 'status' of the import. Once it's finished another response will tell the page to stop polling for status updates.

queries on final decision

ok, so as I thought, it seems that a windows service is the best idea. So as to HOW to get it to work, it seems the 'put the file there and wait for the service to pick it up' idea is the generally accepted way, is there a way I can start a process run by the service, without it having to constantly be checking a database table / folder? As I said earlier, I don't have any experience with Windows Services - I wondered if I put a public method in the service, can I call it somehow?

Posted: Jul 21 10 at 6:10

View 2 Replies!   View Related
Web Forms :: Reverse The Sum Of Digits / Calculate The Reverse-Sum Of Digits?
I'm having a problem to calculate the Reverse-Sum of digits. For instance, the digit sum of 84001 is calculated as 8+4+0+0+1 = 13How can I caculate to reverse sum of digits 8400113 back to 84001?

Posted: Oct 26, 2009 06:35 PM

View 8 Replies!   View Related
How To Search A Textbox For Numbers, And If Numbers Not Found Give Error Message
i need to get id as input..wen d user gives input other than numbers like alphabets or special characters then it should display error message..isnumeric wil work in vb.net.. but i m workin in visual studio 2005..

Posted: Feb 6 09

View 4 Replies!   View Related
Web Forms :: Timeout Error Continues On Long - Running Web App Supposedly Already Configured To Accommodate Long
I've developed a web application to accept video file uploads and then pass them to a backend service on an external server. The application runs without error on the visual studio debugging webserver, but once on a production iis 6 or 7 server, yields a timeout error at about a consistent amount of time into handling a large upload. Specifically, it errors in the middle of transferring the video file to the external server, once the application has successfully received it from the client. I'm aware of several timeouts to be configured related to the problem, and have done so. The application's web config has been tested with one or both of the following settings

<system.web>
<httpRuntime executionTimeout="9999999" maxRequestLength="2048000" />
</system.web>
and
<configuration>
<location path="default.aspx"> (the page at issue that's timing out)
<system.web>
<httpRuntime executionTimeout="9999999" maxRequestLength="2048000" />
</system.web>
</location>
</configuration>

And within the initialization of the webrequest made to the external server to send the video received from the client browser:

HttpWebRequest httpWebRequest = (HttpWebRequest)WebRequest.Create(url);
httpWebRequest.ContentType = "multipart/form-data; boundary=" + boundary;
httpWebRequest.Method = "POST";
httpWebRequest.Timeout = System.Threading.Timeout.Infinite;

So with the execution time limits on both the webform as a whole and the connection made to the external server, I'm at a loss for what timeout is left unconfigured, or how to determine such, when I continue to get the following error: Unexpected error executing Brightcove Upload:...........................

Posted: Jun 16, 2010 11:51 PM

View 3 Replies!   View Related
How To Make A UI With A Panel Of Numbers / Highlighted Numbers
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?

Posted: Feb 15, 2011 09:16 AM

View 6 Replies!   View Related
How To Generate Numbers From Predetermine Sets Of Numbers
i am trying to generate numbers from predetermine sets of numbers.

for instance lets i have 1 2 3

spaced out as shown how can i go about generating 3 numbers and placing them inbetween the spaces, such dat if the first number is odd the first space should be occupied by an even number.

Posted: Mar 20, 2009 07:34 PM

View 8 Replies!   View Related
DataSource Controls :: Display Results From Two Separate Tables In Two Separate Databases?
I have access to two seperate databases (mySQL) located on two servers. I need to get the data, link the tables on a key field and display the results in a datagrid. My challenge is that if the search criteria changes for the display it affects rows returned from on table and should thus automatically affect the linked table and resulting data returned.

what the best approach would be to achieving this? So far I have set up a dataset with a dataadapter and table for each connection and then linked the tables in the dataset. The problem that I'm having is getting the linked resultsets to work.

On my form I have the datagrid with two Objectdatasources one for each dataadapter and i believe that's where I'm going wrong...

Posted: Jan 14, 2010 07:21 AM

View 1 Replies!   View Related
MVC :: How To Separate Project Into Separate Layers
I am beginner to ASP.NET MVC.

We are doing project in Asp.Net MVC and Nhibernate.

How to seperate my project in to layers ? how to design classes ?

should i followany patterns ? repository patterns ?

Posted: Feb 02, 2010 11:52 AM

View 3 Replies!   View Related
Web Forms :: Display Last 4 Digits Of SSN
How to I use DataFormatString to display last 4 digits (xxxxx1234)?

<asp:BoundField ReadOnly="True" DataField="SSN" >
<ItemStyle Wrap="False" />
</asp:BoundField>

Posted: Feb 03, 2010 10:23 PM

View 1 Replies!   View Related
AJAX :: Validate To # Digits?
I have a TextBox in a FormView that I want to make sure that the user enters exactly 9 digits. The FormView is inside an Update Panel so I want to be able to validate without a Postback. I cannot figure out which validation control can do that and how. I already have a FilteredTextBoxExtender that forces all digits.

Posted: Feb 15, 2011 04:30 PM

View 3 Replies!   View Related
Security :: Encryption Last 4 Digits
my code:

[Code]....

I have a stored encryption: "dkljas84u238jidasjidoia"When I get in this instance decryption "11111111111111111"show how the combobox "****************** 1111 "Something like: SELECT RIGHT ('11111111111111111 ', 4)

Posted: Jul 23, 2010 12:21 PM

View 5 Replies!   View Related
Only Two Digits Allowed After Decimal?
I have a textbox where the user must not be able to enter more than two digits after a decimal.How do I do this without using javascript?

Posted: Jan 4 at 17:04

View 3 Replies!   View Related
Use A Regex To Tell If A String Has 10 Digits?
I need to find a regex that tests that an input string contains exactly 10 numeric characters, while still allowing other characters in the string.

I'll be stripping all of the non-numeric characters in post processing, but I need the regex for client-side validation.

For example, these should all match:

1234567890
12-456879x54
321225 -1234AAAA
xx1234567890

But these should not:

123456789 (not enough digits)
12345678901 (too many digits)

Posted: Jan 6 10 at 20:20

View 3 Replies!   View Related
Only Digits Must Enter In Textbox?
i have textbox that it is in a datalist.i want to only digits(like 12,100,54,....) enter in textbox and if there is letter(likea,nh,d,..) show a messege to user.how should i do this. and i don't want to use regular expression validator.

Posted: Nov 22, 2008 02:18 PM

View 2 Replies!   View Related
C# - Sorting Digits In A String Alphabetically?
We have a list of titles, some of which start with numbers (e.g. 5 Ways to Make Widgets). We would like to sort this as if it were "Five Ways..." without changing the title. We know that some movie places do this, but I can't find info online on how to do it.

Posted: Feb 20 10 at 0:15

View 4 Replies!   View Related
Regular Expression With 2 Decimal Digits?
I need the Regular Expression that accepts positive numbers from (0 to99) with fraction of 2 digits ..

Example : 9.12 , 20.29 , 99.99 , 100 etc.....

Posted: Jul 07, 2009 07:40 AM

View 6 Replies!   View Related
Regular Expression To Match 10-14 Digits?
I am using regular expressions for matching only digits, minimum 10 digits, maximum 14. I tried:

^[0-9]

Posted: Apr 24 10 at 5:20

View 5 Replies!   View Related
SQL Reporting :: Number Separator In Every 3 Digits?
I have a TextBox inside my .rdlc file contains decimal numbers. I want to separate its numbers in every 3 digits. How can I accomplish this?

Posted: Jul 06, 2010 05:30 AM

View 1 Replies!   View Related
Web Forms :: Add Digits To A Number With 2 Decimals?
I've build this function:

I like to convert 1234,222 to:

1.234,22

But what happends below is he converts it to 1.234, so verything after the , is gone. How can i change this function so it works correctly?

Also if the number is 1.234,248 the result should be 1.234,25 , so just 2 numbers after the ,

public static string AddDigits(string source, int digitaldigits)
{
System.Globalization.NumberFormatInfo format = new System.Globalization.NumberFormatInfo();
format.NumberGroupSeparator = ".";
format.NumberDecimalDigits = digitaldigits;
decimal i = decimal.Parse("1234,222");//decimal.Parse(source);
//int i = int.Parse(original);
string str = i.ToString("N0", format);
return str;
}

Posted: Jan 25, 2011 02:45 PM

View 4 Replies!   View Related
Web Forms :: Displays The First 9 Digits Of A GUID?
In the following question, I am using C# and ASP.NET 3.5:I am having aproblem with a gift certificate program which requires a way to have the user retrieve a unique validation code consisting of the first 9 digits of a random GUID and the dateand time. I have a page that has a button which creates these labels perfectly, but I can't figure out how to bind them tothe certificate being validated This is the page described above:

[Code]....

I am open to callinganother page calledvia a hyperlink like so:

Posted: Apr 26, 2010 06:10 AM

View 4 Replies!   View Related
Web Forms :: Looking For Regex That Validates 4-digits And Empty Value?
I can validate textbox field by RegularExpressionValidator with regex"^([0-9]{3,3})$". For the required field validation I put requiredfieldvalidator. Thus, I have two validation controls.

Can I combine them into a sigle RegularExpressionValidator? Then what does regex look like? How can I validate empty fields with RegularExpressionValidator?

Posted: Jun 18, 2010 02:24 PM

View 6 Replies!   View Related
DataSource Controls :: How To Extract First 3 Digits From A DropDownMenu
I have a web form where there are couple of DDL's; DDL1 and DDL2 respectively. I want the DDL2 to be populated based on what option is selected in DDL1. Also I just want to extract the first three digits of the value selected in DDL1 and use it in the WHERE clause of the SQL query used to generate DDL2.

My prob is that I am not able to extract the first three digits out of DDL1 to be compared to another field from the DB in the WHERE clause of the SQL query for DDL2.

Here is my code for DDL2

[Code]....

Posted: Apr 21, 2010 10:17 PM

View 15 Replies!   View Related
Web Forms :: Regular Expression Which Accepts No Less Then 10 Digits And No More Than 11?
how to write a regular expression that accepts no less than 10 digits and no more than 11. i need itto validate a textbox for phone number. i have searched the web but i cant seem to find any.

Posted: Jul 04, 2010 04:49 PM

View 5 Replies!   View Related
Jquery - Enable Only Digits To Enter Into The Texbox?
i can not use any plugin.

how to enable only digits number to enter into the Texbox using asp.net

using regexpression or jquery ?

Posted: Mar 23 at 16:00

View 6 Replies!   View Related
.net - Parse Both Symbols . And , As Decimal Digits Delimiter?
I'm writing a banking system and my customer wants support both Russian and American numeric standards in decimal digits delimiter. Respectively . and ,.Now only , works properly. Perhaps because of web server's OS format (Russian is set).String like 2000.00 throws a FormatException: Input string was not in a correct format.How to fix that? I have next two ideas:

protected void FormView1_ItemInserting(object sender, FormViewInsertEventArgs e)
{
var txtAmount = (TextBox)((FormView)sender).FindControl("txtAmount"));

[code]...

Posted: May 5 10 at 10:00

View 2 Replies!   View Related
Web Forms :: Regular Expression - Takes Digits Starting With Zero
I have this regular expression, for currency, which only accepts number and a decimal, however it takes digits starting with zero, like 09788,08383 how can i eliminate this bug from this regular expression here is the regular expression ^d{1,9}(.d{1,2})?$

Posted: May 13, 2010 09:00 PM

View 6 Replies!   View Related
Only Digits, The Digit May Be Decimal / How To Write The Regular Expression
in my web application i want to validate that user can enter only digits and the digit may be a integer or decimal how can i write the regular expression for this.

Posted: Jan 27 10 at 8:49

View 2 Replies!   View Related
ADO.NET :: How To Obtain All Digits From A DateTime Type When Calling Cmd.ExecuteScalar()
I hope this is the right forum for this question.The statement, object obj = cmd.ExecuteScalar() is returning2010-10-22 18:25:36However is not bringing the last 3 digits (miliseconds).This is actually calling the following SQL query: select max(timeStamp) from Table1 which returns 2010-10-22 18:25:36.713 on query analyzer. As you can see "713" is not being included ...How do I bring this value?

Posted: Oct 22, 2010 07:03 PM

View 2 Replies!   View Related
DataSource Controls :: Extract Numerical Digits From A String?
I need to extract numerical digits from a string using sql in a select statement

"Customer is eligible for Balance Billing with $10 credit on the next bill. Fixed monthly Balance Billing amount is $141.38. Offer is valid till the end of March 31, 2010."

I need ot extract 141.38 from teh above text.The length of the decimal can vary

Posted: Mar 18, 2010 06:38 AM

View 5 Replies!   View Related
Forms Data Controls :: How To Sort A Gridview Column By Last 4 Digits
I have a gridview column named "Job Number"and the number is in this format: 01-04-11-3215, 01-04-11-3216 and so on...

Since the first few characters represent the date I need to sort on the last 4 digits.

Posted: Jan 06, 2011 03:29 PM

View 2 Replies!   View Related
Web Forms :: How To Bind A Created Label That Displays The First 9 Digits Of A GUID
In the following question, I am using C# and ASP.NET 3.5:

I am having aproblem with a gift certificate program which requires a way to have the user retrieve a unique validation code consisting of the first 9 digits of a random GUID and the dateand time. I have a page that has a button which creates these labels perfectly, but I can't figure out how to bind them tothe certificate being validated.

This is the page described above:

[Code]....

[Code]....

I am open to callinganother page calledvia a hyperlink like so:

[Code]....

[Code]....

Posted: Aug 04, 2010 11:25 AM

View 5 Replies!   View Related
Web Forms :: Regular Expression To Check If Input Is Made Of Digits Or Not?
I'm using vwd validators and i would like touse the reguler expression validator to check if input is made of digits.

what is the right reguler expression for that?

Posted: Sep 27, 2009 01:13 PM

View 3 Replies!   View Related
DataSource Controls :: Numeric Fields / Display 4 Digits After The Decimal?
Icurrently have a numeric fieldas numeric(5,2) which has 2 digits after the decimal. Now I need to be able to display 4 digits after the decimal. But if I change the field to (7,4) then it places 2 zeros after the last numbers. For example: 1.32 changes to 1.3200.

But some records will have exactly 4 numbers after the decimal such as : 2.4375.

My issue is I don't want all the data to have 4 numbers after the decimal. I don't think there is another data type that will allow this.

Posted: Feb 23, 2010 02:20 PM

View 3 Replies!   View Related
How To Define A Route That Have 2 Optional Parameters In The Middle Of The URL The Start An End Parameters Are Digits
I want to define a route that have 2 optional parameters in the middle of the URL the start an end parameters are digits

[Code].....

Posted: Jun 7 10 at 13:44

View 1 Replies!   View Related
Copyright 2005-08 www.BigResource.com, All rights reserved