.net

.Net Application cannot detect ODP.NET 2.111.6.20 in 64bit windows

Hi everyone, We are currently deploying our .net winform application which depends on ODP.NET 2.111.6.20 via xcopy. Installing on 32 bit windows was fine, however, for some reason our applications cannot detect odp.net in a 64bit environment. I would like to ask if there are special build configurations that i have to do in building m...

How to encode an url as base64 string?

Hi geeks~ I know that I could use HttpServerUtility.UrlTokenDecode Method to do the job. But the problem is that I am using .NET 1.1 and this method is only supported in .NET 2.0+. Also I found that Convert.ToBase64String method is not an option because of the differences addressed here. So what other options do I have? Do I have to wri...

.NET: How to pass command-line parameters with a temp file name

This is .NET 2.0 WinForms. I have some code like so string str = Path.GetTempFileName(); Process p = new Process(); ProcessStartInfo psi = new ProcessStartInfo(); psi.Arguments = str psi.FileName = <some executable > p.StartInfo = psi; p.Start(); Now on the "started" process I get the temp file name by saying args[0]. On Win XP this ...

Are SOAP Remote Procedure Calls atomic blocking calls?

Using VB Express 2008, if the code makes a Remote Procedure call to a SOAP function on another machine is the CPU blocked until the call returns? ...

Calling javascript after a .net validator fails

Is there away to call a javascript function after a validation control fails validation? ...

C# oops concept query

I have a question related to OOPS concept. I have a base class public class BaseClass { public int i = 10; public int x = 30; public string str = "Hello"; public virtual string Hello() { return "Hello of base class called"; } } I have a child class public class ChildClass : BaseClass { public int i = 20; ...

Getting the converter for the type

In the MSDN I've read this about EnumConverter: You should never create an instance of an EnumConverter. Instead, call the GetConverter method of the TypeDescriptor class. For more information, see the examples in the TypeConverter base class. Does anybody know why and is it true for my own implemented converters? For example, I h...

Silverlight horizontal carousel for thumbnails?

UPDATE: I have found this solution... modified it, but am struggling to get it to do a continuous cycle (1st item pops to last in list/array) Any help is much appreciated! using System; using System.Collections.Generic; using System.Linq; using System.Net; using System.Windows; using System.Windows.Controls; using System.Windows.Docum...

Which C# and WCF Book will be really helpful in getting a good concept and practice

Possible Duplicate: WCF Book Recommendation I want speed up creating few good and robust applications using C#,WCF and WPF . So thought , I will ask the community , what really helped them to be so efficient and clear with the concepts behind. which books will really help me to build the fundamentals(You can Say Advanced Funda...

why WebConfigurationManager is supposed to be a preferred way to work with configuration files related to Web applications.

I tried updating a web.config file at run time treating it as an XML file. However the same can be achieved using WebConfigurationManager class. And in fact it is said that using WebConfigurationManager is the preferred way. My question is what's the difference? ...

T4MVC Generates controller empty constructor

Why does T4MVC generate controller default constructor? Just curious. ...

Using PropertyInfo to find out the property type

Hi All, I want to dynamically parse an object tree to do some custom validation. The validation is not important as such, but I want to understand the PropertyInfo class better. I will be doing something like this, public bool ValidateData(object data) { foreach (PropertyInfo propertyInfo in data.GetType().GetProperties()) { ...

Sometimes focus moves to first tab in TabControl when closed a dialog in another app domain

Hi everyone, I have a strange and challenging problem. I have a TabControl with two tabs. When second tab is shown, users could open a dialog with a mouse click. However, this dialog is in another app domain because of some reasons. When users close the dialog, sometimes the focus moves to the first tab, it causes that second tab is hid...

Change the font size of a .net form in Windows CE 6.0 not working?

I have been tasked with modifying an existing phone application to allow it to resize to multiple resolutions. I have it resizing fine by using the Scale function but i'm still finding that the fonts are far too small when run on a high resolution Windows CE device. I am currently attempting to set the forms font to a larger size and re...

What is difference between normal typecasting and using “AS” keyword

Possible Duplicates: Direct casting vs 'as' operator? Casting: (NewType) vs. Object as NewType What is difference between normal typecasting and using “AS” keyword? ...

How to shut down from c#, Process.Start("shutdown") not working in windows XP

After some poking around on how to reset my computer and or shut it down from c# I found this explanation on how to do that: ManagementBaseObject outParameters = null; ManagementClass sysOS = new ManagementClass("Win32_OperatingSystem"); sysOS.Get(); // enables required security privilege. sysOS.S...

Binding GridView to generic collection using TemplateField

I have GridView bound to some List. In layout I created following template field: <asp:TemplateField HeaderText="Phrase"> <ItemTemplate> <asp:TextBox ID="phraseTextBox" runat="server" Text='<%# Bind("Phrase") %>'/> </ItemTemplate> </asp:TemplateField> But after changing the content of any TextBox in column "Phrase" my ...

.NET DateTime, different resolution when converting to and from OADate?

I'm converting a DateTime to OADate. I was expecting to get the exact same DateTime when converting the OADate back, but now it has only millisecond resolution, and is therefore different. var a = DateTime.UtcNow; double oadate = a.ToOADate(); var b = DateTime.FromOADate(oadate); int compare = DateTime.Compare(a, b); //Compare is not ...

What are Few good C# books that will help to build solid concept

Possible Duplicates: Recommended books for learning C#? What are the best C# .NET books? I want to create few good and robust application using C# . For that I need to have very good understanding of C# Architecture , Patterns and other basic yet important concepts. Now I am considering to take it to the next level.So If th...

Keeping persistent data in memory

I am about to develop a Windows service in C#. This service needs to keep track of events in the system, and write some data to files from time to time. These ongoing events form a certain state, so I'll keep the state in memory and update it as events will arrive. I don't want to over-complicate things so I don't want the state to be pe...