.net

Sorting within gridview without any data binding control - how to do it?

Hi, I have a GridView control on my page. GV doesn't use any .net control as a data source to bind to data. I'm doing this in code behind where I'm creating my own DataTable and DataSet. Then I'm binding this DataSet to GV. Next i would like to enable of sorting colums. The issue is that this doesn't work as it should when you don't use...

Creating a multilingual site in Umbraco

Hi, I am rather new to umbraco and currently building a web site for my employer. This site will need to support multiple languages. My question is how this should be implemented with umbraco. I am looking at the following approaches: Create the site structure once and entering different translations for each page. This is described ...

Do we need to build application again while moving it from 32bit machine to 64 bit machine?

Consider an application is built on 32 bit machine. Now I want to move application on 64 bit machine. Do I need to rebuild application once again on 64 bit machine? ...

GetProperty works in .NET 3.5 but not in .NET 4

I use following code: protected object GetProperty(object target, string fieldName) { Type type = target.GetType(); PropertyInfo mi = type.GetProperty( fieldName, BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.GetProperty); object obj = mi.GetValue(target, null); return obj; } It works in .NET 3....

C# What should be the UNIQUE ID of a machine? Its MotherBoard ID? Window Product ID? ??

I want to retrieve the unique ID of a machine. Like others I also did a lot research, and found none of the process of Unique ID generation works perfectly. For Motherboard Serial Number (ID): It is Unique; it cant be changed. However, it may not be found in some machines if Manufactures didn't put information on Memory Location. Then ...

ADO.NET Entity - Help needed

Hello guys, i have 3 tables in my database and i created a entity model from database and it looks like this: what im trying to do is to bind all 3 tables to datagridview and im using a query like this var result = from t in db.Transactions from c in db.Categories from a in db.Accounts ...

Get current style using MSHTML in C#

I want to use MSHTML to get the style of an html element. What I want is the computed style but without all the default values. (only the ones that are set in the html and css) MSHTML has 3 types of styles that I have seen so far style, currentStyle, and runtimeStyle. style and runtimeStyle only has the inline styles and current Style...

EF 4.0 - mapping to readonly property with private field

Is it possible to map following POCO class with EF 4.0? public class MyClass { private string _myData; public MyClass() { } public MyClass(string myData) { _myData = myData; } public string MyData { get { return _myData; } } } In NHibernate I think it is possible when I use Access attribute ...

System.Media.SoundPlayer.Play() freezes GUI

Hi! I am trying to implement a simple game in .NET with C#. There is a ball bouncing against objects, and when it bounces I play a sound asynchronously using System.Media:SoundPlayer. The problem is that most of the time (not always) the ball freezes at the time of impact, for as long as the sound plays. This happens on Windows XP, b...

Is there any Puppet Master Service to application Using UI Automation Framework in .Net?

I know white but it is a library, what i am looking for is a kind of application or service (windows service), It would be great if it is extensible and open source. ...

EPUB creation in .Net

Is there any library out there that I can use to create epub files in .NET/C#? A Flowdocument -> epub conversion tool would be ideal, but any kind of library would be great. I am also interested in an assesment of how complex it would be to write one. I understand that it is basically a bunch of zipped XHTML files, but I keep hearing th...

LINQ query and IDisposable

I'm currently writing a piece of code that does some searches which returns IDisposable objects (DirectoryEntry to be specific from an ADAM instance) and I end up with code similar to using(var entry = (from result in results let entry = result.GetDirectoryEntry() where entry != null ...

How to get status code from webclient ?

I am using webclient class to post some data to a web form. I would like to get the response status code of the form submission. So far I've found out how to get the status code if there is a exception Catch wex As WebException If TypeOf wex.Response Is HttpWebResponse Then msgbox(DirectCast(wex.Response, HttpWebRespon...

How can I group RadioButtons without a GroupBox in VB.NET?

I want to group RadioButtons, but I don't want to use the visible control GroupBox. Is there something like the Java ButtonGroup in VB.NET? ...

Is there a way to demo / test a Windows Mobile app without Visual Studio 2008 Pro

Members in my team needs to test/ see a demo of a mobile app that has been developed. If they had VS2008 pro then they could use the emulators on this. But they don't. Can they see a demo/test via another avenue/emulator? (apart from on an actual phone) ...

Is there any technique for profile testing application in isolation?

I am a dummy in profiling, please tell me what you people do to profile your application. Which one is the better, Profiling the whole application or make an isolation? If the choice is make an isolation how you do that? ...

Best approach/data type(s) for a date and two times in .Net 4

Hi all, I've got a method which takes some parameters and generates some XML to be sent to an [archaic] web service. I need to include in the XML: Date (yyyy-mm-dd) Opening time (hh:mm) Closing time (hh:mm) Now in the past when I've had to provide a date/time separately, I've taken in a single DateTime parameter and for...

ListItem add to comboBox

Hi, I am working on C#.Net project with Infragistics. My project I want to implement search options, like Microsoft office Outlook 2007 Instant Search functionality. For that I am using UltraComboEditor. In UltraComboEditor I have added 3 ValueListItems (Search all screen, search current screen, search options). I want to add one more i...

Why does Enum.Parse create undefined entries?

class Program { static void Main(string[] args) { string value = "12345"; Type enumType = typeof(Fruits); Fruits fruit = Fruits.Apple; try { fruit = (Fruits) Enum.Parse(enumType, value); } catch (ArgumentException) { Console.WriteLine(String.F...

what are the pros and cons using LINQ to SQL ?

performance ? architecture ? the system in question will always be a MS SQL database there is an existing DAL but there will be refactoring done on the system and Linq-to-SQL seems a good candidate to avoid maintaining a DAL or SP's ...