.net - Parse Both Symbols . And , As Decimal Digits Delimiter?
May 5, 2010
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:
i want to display these symbols in a textbox [URL] ok say i want to display a square root symbol I need to parse html command txt1.text=" html command square root symbol is " & √ 'this needs to be parsed
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.
I currently have a numeric field as 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.
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.
i hav one data table in which some decimal values are up 6 decimal places.. im trying to bind that Data table to DataGridView while binding i want to round decimal values up to two decimal palces here is my code
dt.Columns.Add("Orderid", typeof(string)); dt.Columns.Add("tagnumber", typeof(string)); dt.Columns.Add("Minimum Value", typeof(string)); dt.Columns.Add("Maximum Value", typeof(string)); int count = ds.Tables[0].Rows.Count; for (int i = 0; i < count; i++)
I was read your post: "Export GridView to Excel in ASP.Net with Formatting using C#" and is very useful. That code works perfect. But I need create a new format for a specific column in my sheet before to export it. For example:My DataTable have a column with decimal numbers and I'm trying reduce the tenths for each number.I want this: 2,874444 ----> 2,87 for a specific range. In this case I need it for all numbers in the column 13 or well said for the Column called N in Excel. Only reduce two tenths.
I'm trying to execute this statement every minute with SQL Agent, I have it set up as a job:
[Code]....
It's trying to update a column which data type is set to decimal. Just so you know what I really need out of it, here is an example:
[Code]....
The answer of which should add on 0.5 to the original value. If I were to use the increase value of 60 which then becomes 60/60 it will work.I'm dividing by 60 because the increase value is per hour so I make it smaller to get per minute value. Why is it doing this?
The UniqueID of a control is delemited with the '$', is it possble that the delimiter can change, and if so, is there a property somewhere that contains the delimiting character?
I am grabbing data from a peoplepicker control (sharepoint) that compiles users into a string. For instance, if the user added 3 users, the string would look like: John Doe CONTOSOjdoe User Jane Doe CONTOSOjadoe User John Smith CONTOSOjsmith User I want to use Split with"User" as the delimiter. Since the delimiter is 2+ characters I'm getting the error: too many characters in character literal. Tried to specify User as the delimter like:
I have a column with a random length of text, basically it's an old crappy mfg system that stores data in a tilde delimited list. I need to output this column into each seperate column for a view. Column names don't matter, they can all be unnamed but so long as the data returns as seperate columns is what I'm after.
I recently upgraded to Windows 7 64 on my development machine. I am trying to setup my development environment. I have discovered something strange. When trying to set breakpoints in my ASP.Net application the breakpoints will only work if they are in the root folder. My ASP.Net project has various sub folders and any breakpoints in code that is stored in the sub folders turns yellow when debugging starts and states breakpoints will be missed.
I have deleted the temporary folder in c:windowsmicrosoft.netframework .... etc. etc. etc. I have checked the folder permissions in the root and all sub folders (they are the same). I have deleted and rebuilt the subfolders. I have right clicked VS2008 and said to run as administrator. Nothing seems to fix it. I can debug root level code behind pages but anything stored in a subfolder will not debug.
IS it possible to use mathematical symbols in asp.net application.
I am developing a online assessment web application. In that I need to use mathematical sysmbols as question and the user also should be able to use that symbols.
Is it possible? Is any other third party editor is required?
Special symbols are a real pain to learn about because you can't Google for them (try doing a Google search for "<%#" and you's get nothing).
I've been a programmer for many years, and I'm trying to get my head around ASP.net, and especially the "special symbols"; what they mean, where to find out more information about them. Because they're impossible to search for, it'd be wonderful if there were special resources in place to help newbies learn about these.
Specifically, I'm looking for detailed instructions on the porpose for, and use, of the following constructs:
<%@ %> <%$ %> <%# %> <%= %>
What is expected in each, what is allowable in each, and what "gotchas" would a newbie have to be careful for when employing each.
For example, I want to do some coding in a <%# %> block, like:
Text="<%# if (Eval("InUse")) {Eval("ProductName")} else {"Not In Use"} %>" -- would this be allowable, and if not, what are reasonable alternatives?