I'll use the Math.Round function, but there happends something strange. If i have a numer like 10.0012356 he adds with round(10.0012356) only 10, and not the wanted 10.00 But if i have 10.534, he adds 10.53, so then its ok. How can i change that? I use this code right now:
My web page allows customers to search products by selecting criteria. In this example, they can choose a height range (we'll use the example between height 2.00 and 2.99). The issue is, the database returns a results which has a height of 3.00 (which is obviously not between 2.00 and 2.99) I am using a stored procedure.
[Code]....
My webpage passes the paramters for @Pr and @Pr2 (which are of type double) to the stored procedure (@Pr = 2.00, @Pr2 = 2.99). My c# code (simplified - FYI, request.QuerysString["p"] returns the string value 2)
[Code]....
You can see from the C# I have commented 2 lines for debugging where I've used the dqsPr variable and where I've typed the number in manually. Regardless of sending either the variable or the actual 'number', the results remain the same (it shows a product which has a height of 3.00). If I change the Stored procedure (for debugging purposes only) Select statement to SELECT DISTINCT PartNumber, Positions, Switch, Post, Profile FROM View WHERE Height BETWEEN 2.00 AND 2.99 ORDER BY Type ASC it works fine. So, it must be due to the passing of the paramaters via ado.net?
Given the code below, how do I compare a List of objects's values with a test value? I'm building a geolocation application. I'll be passing in longitude and latitude and would like to have the service answer back with the location closest to those values. I started down the path of converting to a string, and formatting the values down to two decimal places, but that seemed a bit too ghetto, and I'm looking for a more elegant solution.
public class Location : IEnumerable { public string label { get; set; } public double lat { get; set; } public double lon { get; set; } //Implement IEnumerable public IEnumerator GetEnumerator() { return (IEnumerator)this; } } [HandleError] public class HomeController : Controller { private List<Location> myList = new List<Location> { new Location { label="Atlanta Midtown", lon=33.657674, lat=-84.423130}, new Location { label="Atlanta Airport", lon=33.794151, lat=-84.387228}, new Location { label="Stamford, CT", lon=41.053758, lat=-73.530979}, ... } public static int Main(String[] args) { string inLat = "-80.987654"; double dblInLat = double.Parse(inLat); // here's where I would like to find the closest location to the inLat // once I figure out this, I'll implement the Longitude, and I'll be set }
When i am trying to update a text box value to data base ,say 3.1 it is getting updated as 3.09999... when iam running the stored procedure in query analyzer it is updating correctly. When i am updating the same from page , it is giving this problem. Iam using sql server 2005.
I have created my own login control (for a few reasons) and would like to surround the textboxes and label controls with a rounded corner box. How do I surround the controls with a box and then how do I make its corners rounded? Can I then create a background-color within the box? I have the AJAX toolkit installed and do know how to add extenders but I am kind of stuck on surrounding the controls.
I ran across a bug with the asp:RoundedCornersExtender when viewing in Firefox. Sometimes there will be a gap between the top of and the body of the panel. There are a few posts out there about using the solution
[URL] here, but the problem is my hosting account (GoDaddy) won't allow the PrettyUI.dll file to run. Is there any other solution to using the dll file? The source code is available - but I'm not familiar with how I'd go about using the source files in place of the DLL...
I was trying to use Ajax rounded corner control. When I set properties for panel from theme folder css file it was not working. If i provide from server control it is ok. Why it is like that?
I am trying to m ake rounded buttons using CSS. I serached a lot on the internet but all the solutions that I found is using the Images. (See URLs Mentioned Below). is it possible to create rounded button using CSS without using any image. [URL]
When using the rounded corners app in Ajax the corners are bad shaped. I have found this article from Matt Berseth using antialiasing. But I need code I can use for commercial use, do you have any good ideas for solving my problem? I need code for vb.net applications [URL]
I have a datalist which contains only the image button.I want to add rouned corner to this image.So i have used rounded corner extender for image button.But still no rounded corner,but there was no bug.
Yet another post regarding rounded upper corners on an ASP.NET 3.5 horizontal menu control. I've done a day and a half of Googling.Found this link http://forums.asp.net/p/1582204/3989473.aspx. It looked promising but didn't pan out.I got pretty close with some experimenting but it isn't quite there. Could really use some insight or a general agreement that it just can't be done within our constraints.The project is an ASP.NET 3.5 web app. For reasons that are too lengthy to go into here, theoption of using the AJAX tab container has already been examined and rejected. Due to the customer's requirements, we will need to proceed with a menu control set to horizontal display with 2 levels showing. The customer would like to see rounded edges on the top of the menu elements so they have the appearance of tabs. In our corporate-controlled environment, we have as our options the AJAX Control Toolkit, css,
My Asp site does not support some version of IE and chrome. however its working fine on all version of firefox.
What could be the solution that my site function on all version of IE.
I have used round corner extender on textbox and dropdownlist so some version of IE does not show data in dropdown where i applied round corner extender.
I have taken background-image of a Table and Panel, that image's corner is rectangula. How can i make its corners Rounded ?I searched some online resources, images were made rounded, how to make make background-image rounded on the fly ?
I've looked everywhere and googled everything and couldn't find anything good. What I need is a class that is able to draw an image (graphics) with rounded corners (different on each corner is a plus) with a border and gradient fill.
All the examples I find have some flaws (like bad quality, missing functionality etc).
I will use this with a ashx that will draw the image and then show it to the user.
I have an ajax call on a page which POSTS data: longitude and latitude. In the Javascript the two variables I pass in "posLong" and "posLat" are both decimals, something like: 50.81472239. When I do request.form in my .aspx.vb page which I've called, the value has now been rounded to 51.