.net

How to display a popup message at the time of page closing

Using ASP.Net, VB.Net When i close or exit the page, it should show the pop up message like "page closing" Need code help ...

How to attach the file

Using ASP.Net, VB.Net In my web page, i want to attach the file. How to attach the file Need code help ...

Entity Framework - How can I create an array of complex property?

In Entity Framework v1, can I create an array of complex property? Assuming I've a "Question" entity can it have an array of "Answers" (that compose from text and timestamp)? ...

How to determine type from a given string input.

Is there any method to detect the type from a given string input? Eg: string s = "07/12/1999"; I need a method like string DetectType( s ) { .... } which would return me the matched datatype. i.e. "DateTime" in this case. Would I have to write this from scratch? Just wanted to check if anybody knows of a better way before I went abo...

How to format a string displayed in a MessageBox in C#?

I want to display a string in a message box with a following format: Machine : TestMachine User : UserName I am doing this: string strMsg = "Machine :" + "TestMahine" + "\r\n" + "User :" + "UserName"; MessageBox.Show(strMsg); When I do this the message box do not display a string as formated above. Colon...

How to send the web page values to the emai

Using ASP.Net, VB.Net In my web page, i have the textbox values when i press the send button the textbox value automatically send to email address... How to do that... Need Code Help ...

How to create intel sample applications using ASP .net

Hi , where should I get the sample applications of Intel mobile( Smart phone) applications. Can u provide Links for those sample applications using ASP.Net ...

How can I replace each new line with a auto-incremented number?

I am lookind for a effective way that I can replace newlines with an auto-incrementing number. eg. this is line 1 this is line 2 this is line 3 this is line 4 to 1. this is line 1 2. this is line 2 3. this is line 3 4. this is line 4 Is looping through each line the only way? I guess thats the way I will implement it for now. U...

.NET WCF SVC file downloaded instead of being executed

I am using a WDF Service in my web application which I am accessing very jquery. Locally it works fine, but on my test server (IIS7) it does not. I tried accessing the .svc via the url (www.mydomain.de/Services/MyService.svc) expecting that I get the same page as offline ("This is a WCF service, metadata publishing is disabled ....". I...

WebKit .NET Proxy Settings

Hi guys, I currently have a browser project which will allows users to select a proxy server. I'm using WebKit .NET by the way. However, when I tried changing my proxy settings in Internet Explorer(Registry), it doesn't seem to recognize the new settings. My other browsers seem to acknowledge the proxy, even safari. Anyone here tried ...

Is there a way to set textblocks to static on a UserControl in C# before compile?

EDIT: Apparently I was a little confusing. The original post will remain below, but the main thing I'm asking is if there is a way to make a textblock on a usercontrol static, so that when I try to set it's value with a static method, it doesn't whine and say "An object reference is required for the non-static field, method, or property ...

What would you reccomend to read to a person who is going to write his own DB?

Since there are no answers to my previous question. I'm really thinking to implement a custom DB which will satisfy my requirements. Yes I know, sounds crazy. But what books, articles and etc. would you recommend to read? If it does matter the requirements for my DB are following Graph oriented - optimized for storing graphs and ...

WCF and SOAP exception handling policy

Has anyone got a framework that can be used to determine whether specific communication exceptions are connection or timeout errors? I have some central Head-Office systems that communicate with various other systems, some SOAP, some WCF and some TCP Sockets. These all create financial transactions. For each of the above cases I need c...

WYSIWYG Editor in .NET

Hi, I need a small WYSIWYG control in my application. The internal representation is some kind of xml, but I couldn't find anything in the internet concerning wysiwyg which appart from html or rtf editors. For example when the internal representation is something like "some text <ask pivot="x">name</ask> some text" I want the user...

.NET Reflective Dependency Injection with Multiple Containers

Hi Guys, I'm relatively new to dependency injection, so I'm probably butchering the concept to some extent. However, I'm trying to achieve something like the following, but am unsure as to whether or not it's feasible: Lets say I have two containers, each containing different instances of the same type of dependency. For example, each ...

.net assembly interop exceptions handling

I am calling a .Net assembly from a Delphi project using COM interop. Can I catch .Net exceptions in Delphi thrown by the assembly? ...

Get an int? from db using DbDataReader

Is there any smart way to abbreviate this obscenity? It works, but it's unreadable... int? myVal = r.IsDBNull(r.GetOrdinal("colName")) ? (int?)null : r.GetInt32(r.GetOrdinal("colName")); Thanks :) ...

Drop Down List in .NET Windows application

I have a dropdown list which contain "HR", "Test", and "DEV". I want on the basis of selection "HR", "Test", and "DEV" the second dropdown values will display. private void additems() { //Controls.Add(cmbpackage); cmbpackage.Items.Add("HR"); cmbpackage.Items.Add("Test"); cmbpackage.Items.Add("DEV"); addmodules(); } p...

PropertyDescriptor GetChildProperties doesn't return properties from type extending interface which inherited another interface

the 3rd assert in this test fails but if I would move the Id property from IEntity to IFoo it will work I need to get all the properties, how to do this ? (whitout passing an instance, for some reason this way works) [TestFixture] public class DescriptorTests { [Test] public void Test() { va...

Run delegate method with BeginInvoke

Hi, In my class I have a staic method publis static void DoWork(int param) ... I want to run that method like: Form.BeginInwoke(DoWork, param); Is that possible? I tryed with the MethodInvoker class ... but I don't want to define the method body inline. Is there any generic delegate? Or do you know any other way of calling this ... w...