.net

mobile services in web service(internet to mobile messaging)

i am creating a web application, one of my project module there is a feature of sending sms(password) to the client for authentication...... is it possible to do it... how con i do it also give some reference code and tutorials.am doin my project in dot net(c# and asp) thank you ...

How to add custom property and events to a control say textbox or button.

I want to add a custom property to a button in window form. Currently i am using following code to create my logic. but i want to create an enum value for a button control. btnPartyDetails.Text = "View"; {} btnPartyDetails.Text = "Add"; {} btnPartyDetails.Text = "Delete"; {} btnPartyDetails.Text = "Edit"; {} I want to perform som...

.net does ArrayList.Clear free up memory?

I have a heavily populated arraylist, which I want to clear and reuse. If I clear it will it free up that previously used memory? I should also mention that the arraylist is a private read only field of a class that still has lots of active work to do after I use the arraylist first time round. So I can't wait for garbage collection aft...

Should I use the Uri class to represent an OpenId identifier in .NET?

Is it appropriate to use the .NET Uri class to handle OpenId identifiers in my code? Or am I better off just using a string? EDIT: The reason for my question is that I want to know the best data type to use for OpenId identifiers in the domain and persistence layers of my application. I'm using DotNetOpenAuth at the web presentation lay...

Problems with MDI in Windows XP

I'm working on a .NET 2.0 WinForms app that uses MDI. It works perfectly when I'm testing it under Windows 7, but when I install the exact same application in Windows XP the child windows are no longer MDI windows. I can drag them out of their parent window. Does anybody have an explanation for this odd behavior? Update: It works on W...

.NET Installer Project - Create shortcut keeps reinstalling everytime

I have a .NET project (VS2008 .NET 3.5) that builds an exe. I have an installer project as part of the same solution that creates an installer for that exe. In the File System for the installer, I create a folder for my application under the User's Programs Menu. In that new folder, I dump the .exe and .exe.config. I also create a ...

How can DBNull not equal DBNull

I have the following line of code if (DBNull.Value.Equals(o) || o != null) where o is object o in row.ItemArray I keep getting an error of --> Xml type "List of xdt:untypedAtomic" does not support a conversion from Clr type "DBNull" to Clr type "String". What I don't understand is that when I step through my code this if should be...

Encrypting config files info

I have many ASP.NET applications running on server and i want to encrypt the web.config file for each. Is there a way I can encrypt all config files using single class/app or do i have to write separate code under each solution/project to encrypt config? I have idea how to do one file in a project using http://davidhayden.com/blog/dave/...

C# - Entity Framework - The EntityContainer name must be unique. An EntityContainer with the name 'Entities' is already defined.

For a little background: I have a DLL project with the following structure: Rivworks.Model (project) \Negotiation (folder) Model.edmx (model from DB #1) \NegotiationAutos (folder) Model.edmx (model from DB #2) I have moved the connection strings from this project's app.config to the web.config file. They ...

Interface with symbol ppt88xx's bar code scanner using .NET CF

I need to interface with a symbol ppt88xx's bar code scanner using .NET CF. Any ideas? ...

Reusing OpenFileDialog

I have 2 textboxes and 2 button [...] next to each textbox. Is it possible to use one OpenFileDialog and pass the FilePath to the respective textbox, based on which button is clicked? i.e...if I click buttton one and laod the dialog, when I click open on the dialog, it passes the fileName to the first textbox. ...

Changing Urls on ASP.NET form with Master pages

We've had a requirement from a client to move a site that is running on it's own domain to a subfolder of another app. I've acheived this using ISAPI rewrite proxying. However, there is one form that does a post back in the site. The generated url for the action from ASP.NET is "/sign-up.aspx?". This sends the postback to the root of t...

Detect inserted row dataadapter

I'm trying to detect a new row in the database with a dataadapter, so I can trigger some events. It would be easy if I could use a timer(but I can't) ...

How does one test async code using MS Team System Unit Tests

I'm writing some super simple async code. Just saving a file off-thread. I'd like to test this code using the clever Unit Test framework in Microsoft Visual Studio Team System 2008 .NET XP Extreme Edition blah blah blah... How? I'd like to simple block the test method until the method returns. I can imagine some ways to do this, but I...

Entity Frameworks - ToList() and 0 Records

When expecting a recordset (>=1 record) how do you check for that 0 record situation? For example: RivWorks.Model.FeedStoreReadOnly store = new RivWorks.Model.FeedStoreReadOnly(AppSettings.FeedAutosEntities_connString, AppSettings.FeedAutosEntities_metadata, AppSettings.FeedAutosEntities_providerName); RivWorks.Model.NegotiationAutos.E...

How does SmtpClient determine which mail server to use when localhost is specified?

I was setting up ELMAH to send email notifications of errors, and I discovered something interesting that caught me by surprise. In my web.config, the elmah section was set up like so: <elmah> <errorMail from="[email protected]" to="[email protected]" subject="Error Notification" sm...

.net sql query logging using SSMS Tools pack

I have just installed SSMS tools pack from http://www.ssmstoolspack.com everything seems to work except I cant view queries from my .net application. If I run a query through management studion SSMS correctly displays the query. but when running my application no queries are shown in the local history window. There is mention of enabl...

MSChart - Auto Zoom Y Axis on X Axis Zoom

I'm using MSChart and I want to enable zoom on the X Axis and once this is zoomed I want the Y Axis to auto zoom into a range appropriate for the data viewable. Any assistance with the problem would be greatly appreciated! Thanks ...

converting rgb values to System.Drawing

Hi, I've looked around, but don't see this question - maybe its too easy, but I don't have it. If I have file containing color values like: 255, 65535, 65280 ( I think this is green) is there a way to either: convert these to a System.Drawing.Color type or....better yet.. have .NET accept them as is to represent the color? thank...

WSDL.exe generated client gives: Unhandled Exception: System.InvalidOperationException: There is an error in XML document (...)

I have a WebService that returns complex objects. public class Resource; public class Asset extends Resource; public class Collection extends Resource; The methods that return the subclasses work fine: Asset[] getAssets(); Collection[] getCollections(); However the methods that return the base class are generating an exception...