[C#] Celsius symbol in RichTextBox
I write windows application using C# and .NET2.0. In RichTextBox I would like to show Celsius symbol. How to do it? Is it possible? ...
I write windows application using C# and .NET2.0. In RichTextBox I would like to show Celsius symbol. How to do it? Is it possible? ...
I want to use HTML pages in a Windows application using C#. Can anyone help me? ...
Hi I'm trying to execute a SQL command, but I just can't find out why this is not working. This is how I defined the "execute" function in my class named "clsSQL": ''#... Private m_sConnectionString As String = String.Empty ''#... Friend WithEvents m_objConnection As SqlConnection Friend WithEvents m_objCommand As S...
I've written my own custom data layer to persist to a specific file and I've abstracted it with a custom DataContext pattern. This is all based on the .NET 2.0 Framework (given constraints for the target server), so even though some of it might look like LINQ-to-SQL, its not! I've just implemented a similar data pattern. See example be...
I'm calling Thread.Join on a ThreadPool thread at the end of a service. The code executed in the thread ends about the same time as Thread.Join is called, but the Join takes 2 minutes to return. Why is it taking 2 minutes for Thread.Join to return. The log: (2009-10-08 14:22:09) Inf: ProcessRequests - Interrupted, exiting. (2009-10-0...
Hi, I would like advice on the best way to restrict access to a weba pplication (using .net 2.0 and II6) based on the clients IP address. The two ways I am considering: 1) Through the server side code - check the client I.P against a list of IP addresses within the web.config. 2) Through IIS by creating a virtual directory and restric...
This is what I'm doing: Using jquery, I'm popping up a "form" over the page that lets the user search for branches of the company and select the one they want. When the form pops up, they can type in a textbox, and it will do AJAX requests back to the server to return the top n results for what they've entered, and those results will be ...
Hi, The SuperAdmin page in my web application has a method call to getAdminStatus() but I cannot find any occurences of this method when searching the entire solution. Is this method part of the .net 2.0 framework. <ItemTemplate> <asp:Label runat="server" ID="admin" Text="<%= getAdminStatus() %>"></asp:Label> </ItemTempla...
Hi: I'm trying to create a diagnostic log for my application that will display the latest version number of an assembly installed in the GAC. For example, there are two versions of the same assembly in the GAC: foo.dll version 1.0.0.0 and foo.dll version 2.0.0.0. I need a function like the following: GetLatestGacVersion("foo.dll"); ...
Let's say I add a web reference to a project), I would instantiate it like this: MyWebService.MyClass myClass = new MyWebServive.MyClass(); Is there anyway to get the URL of this web service aside from checking the config file, e.g: myClass.getURL(); at runtime? Does anybody have some ideas? ...
I am parsing a big number of big files and after profiling my bottleneck is: XmlDocument doc = new XmlDocument(); doc.Load(filename); This approach was very handy because I could extract nodes like this: XmlNodeList nodeList = doc.SelectNodes("myXPath"); I am switching to XmlReader, but When I find the element I need to extract I a...
I have a string, that is in the following format: [Season] [Year] [Vendor] [Geography] so an example might be: Spring 2009 Nielsen MSA I need to be able to parse out Season and Year in the fastest way possible. I don't care about prettiness or cleverness. Just raw speed. The language is C# using VS2008, but the assembly is being bu...
Hi, all I am having performance problem when truing to fill typed list. Below is my simplified code: public static List<Product> GetProducts() { List<Product> products = new List<Product>(); using (DbQuery query = new DbQuery()) //this is database access class { query...
I am running a DNN 4.9.x site with a number of custom modules that we've written. They all use .NET 2.0 until I upgraded one of them to use 3.5. Now I'm getting this error on the 2.0 modules error CS0433: The type 'System.Web.UI.UpdatePanel' exists in both 'c:\WINDOWS\assembly\GAC_MSIL\System.Web.Extensions\3.5.0.0__31bf3856a...
Hi, I've got a .NET 2.0 Windows desktop application (time-sheets) which i develop and wanted to add a Gadget interface to it (so that app runs hidden and is controlled via the gadget). What is the easiest way to get my gadget to communicate to my app? An idea that i had was to have a built-in web server inside the app, and the gadget ...
Hello everyone. In a WinForm application using C#.NET 2.0 (on Vista), I am using SHA1 hash to create a hash from a string and store the hash in a text file (with UTF-8 encoding). I want to use the hash stored in text file to in a condition. When I run the project in Vista it works properly (i.e. the condition results in true), but when I...
I'm creating an intranet web-application in an IE shop and I'm looking to retrieve the user's logged-in computer username without prompting for a username/password combination. This is easy, until the application is placed on a webserver. It seems that every combination I try from here on in results in either a null string or prompting...
Hi All! How can I determine the actual filename (App_Code_xxx.dll) of the types (classes) which is being built by my build provider. For instance I have a build provider which injects classes based on some configuration. Say MyNameSpace.MyClass. When this build provider is consumed by the Web App. I just want to know the actual file(.d...
Hi, Is it possible to configure a WebSetup project to not overwrite config files? Why? We have several websites that runs in both staging and prod and I would like to have one installer instead of one for staging and one for prod. /Carl ...
At the very beginning. Created a new Excel Workbook from VS2005. Try to save it? Cannot access the .xls file. Try to run it? same error, plus the customization permissions error in the title. Where do I set the permission? EDIT I've read a few SO questions and answers around this and it all seems terribly over-complicated. Give me...