.net

How do I catch the exception in windows application in c#?

Where should we catch exception In Layer Boundary (UI->BLL & BLL->DAL) In that methods where there is no interaction between Layers only some business logic present How do I write exception in Save/Delete where some DML statement executing? What should I write in DAL end? What should I write in BLL end? What should I write in UI e...

insert/update/delete with xml in .net 3.5

Hello guys, i have "UserProfile" in my site which we have stored in xml fromat of xml is as below <UserProfile xmlns=""> <BasicInfo> <Title value="Basic Details" /> <Fields> <UserId title="UserId" display="No" right="Public" value="12" /> <EmailAddress title="Email Address" display="Yes" right="Public" value="vrun...

HTML Agility Pack

I want to parse the html table using html agility pack. I want to extract only some predefined column data from the table. But I am new to parsing and html agility pack and I have tried but I don't know how to use the html agility pack for my need. If anybody knows then give me example if possible EDIT : Is it possible to parse htm...

Problem with .NET Settings.Reload() and Settings.Save() Settings not loading

I have a strange issue that I can't figure out. I have a custom settings class that inherits ApplicationSettingsBase. It has a user scoped settings as shown below. /// <summary> /// The Last Active Account /// </summary> [UserScopedSettingAttribute()] public AccountKeyClass ActiveAccount { get {...

Autocomplete extender on a textbox without using webservice.

Hi Guys, I don't want to use a webservice to populate an autocomplete extender on a textbox. In this case, it's where the user is entering country name and I don't want to make a trip to the database every single time. I'd much rather keep a collection in session state and 'bind' the autocomplete to that. Is it possible to set ServiceP...

ASP.net - First build fails with 'Unknown server tag'

I have multiple custom controls used on a ASPX (and C#) page registered from within the page rather than in Web.Config. On the first build (or rebuild), build fails with error messages for wherever I've used the custom controls. Subsequent builds are successful. The error message: Unknown server tag 'prefix:ExampleControl'. What ...

.Net ActiveX component is not working from Remote Machines.

hi I have developed ActiveX componet i.e actually wrapper around a .Net Library. Every thing working fine if i launch the application from local ie where the application is hosted. The library actually prints a card. if i launch the application from a remote machine, The print dialog is coming but no printing is happening. Thanking...

WCF REST + Windsor error handling

I want to handle application's internal exceptions in a consistent way so that REST web services return errors in a RESTful way. I'm using Castle's WCF integration and I couldn't find any good sources on how to do handle errors using WcfIntegration.WindsorServiceHostFactory. The only solution that comes to mind is to use Castle's inter...

Strings and Garbage Collection

I have heard conflicting stories on this topic and am looking for a little bit of clarity. How would one dispose of a string object immediately, or at the very least clear traces of it? ...

Motorola MC9090G with Windows CE - user interface language / .net compact

I am developing a windows CE program for the Motorola MC9090G which is running Windows CE 5. The user interface language is set to English (United States) and can't be changed. I've talked with the distributor of the device, but he said there aren't any language packs available. I've build the application in two languages - English as d...

To implement a currency converter for helping the buyers to know how much cost in their own currency?

In my asp.net(c#) shopping cart web application. I need to implement a currency converter for helping the buyers to know how much cost in their own currency. When a buyer selects his country.I need to show the converted amount based on his country. Please give examples/reference links for solving the same. ...

How do we catch Exception using Enterprise Library Exception Handling Application Block

I am using Enterprise Library Exception Handling Application Block. I have created a Policy, an Exception and a Custom Handler. Should my custom handler handle specific exception or system exception or both? ...

How to set head tags in a function in app_code?

The below function has to be put within my common functions file in app_code folder. how do I do it? It gives error like this: Reference to a non-shared member requires an object reference Public Sub setHeadTags(ByVal title As String, ByVal description As String, ByVal keywords As String) Dim metaDescription As HtmlMeta = DirectCas...

RichTextBox Scroll Sync and 16-bit Limit

I am synchronizing the vertical scroll events of two RichTextBox controls using the EM_SETSCROLLPOS/EM_GETSCROLLPOS method. While things seem to be working well for short text files, I am hitting the 16-bit limit with long text files. Specifically, when I have text over 65,535 pixel lines, the message handler appears to be scaling the sc...

What is the Invariant Culture?

Could anybody raise an example to demonstrate the usage of Invariant Culture? I don't understnd what the documents describe I have read. ...

Which platform to develop web-based game in?

I'm thinking of writing a new web-based game, and wondered if anyone had any suggestions on which platform I should opt for. The game will be 2D sprite based, but will need to maintain a decent fps rate (there'll probably be up to 20 things moving at once). It'll all be controlled via the mouse. I use .NET daily, so Silverlight seems ...

Attempted to read or write protected memory-Sql Compact and .NEt

I've tried to run the application in two situations: with SQL Server compact edition (3.5) installed and one without. When SQL Server Compact edition isn't installed, I get the following error: Exception :Attempted to read or write protected memory. This is often an indication that other memory is corrupt. Inner Exception : ==========...

clickonce deployment

Given to following default security zones Internet Zone Intranet Zone Trusted Site Zone My Computer Zone Which security zone is appropiate to the following deployment locations? 1) web 2) web using ssl 3) password protected network share 4) cd-rom ...

save System.Net.mail.MailMessage as .msg file

Hi, I am building an application where i am obligated to create a MailMessage (System.Net.mail.MailMessage) and save it on the disk as .msg extention not .eml Below is the method i'm using to save a MailMessage as .msg file: public static void Save(MailMessage Message, string FileName) { Assembly assembly = typeof(SmtpC...

Any ASP.Net benchmark tool?

I would like to measure the performance of the .Net application, especially web application in ASP.Net when running in the server. I need to know any benchmark tool enable for me to know my source code can be optimize. As long as the benchmark tool can be helping me optimize the performance of the website. Any recommendation for gettin...