EDIT:
From the answers given, it's been made rather clear to me how the design I'm asking about below should actually be implemented. With those suggestions in mind (and in response to a comment politely pointing out that my example code does not even compile), I've edited the following code to reflect what the general consensus seems t...
Within my ASP.NET application, I'm loading an XML file into an XSLT with the document() method, as follows:
<xsl:variable name="more-xml" select="document('generateXml.ashx')" />
This works fine when I run it locally, but fails when I deploy it to the server because the server finds generateXml.ashx through the file system, so it isn'...
I'm experiencing some different behavior after switching from ASP.NET MVC 1.0 to ASP.NET MVC 2 Beta. I checked the breaking changes but it's not clear where the issue lies.
The problem has to do with the default model binder and a model that implements IDataErrorInfo.
The property (IDataErrorInfo.Item):
public string this[string colum...
Hi
I develop a desktop application that will be installed in few stations in the local network, I want the *.settings to fetch the settings from the DB when the program loads, the save it on SaveChanges.
I don't care in which way to do it (I thought SQL would work best as this is the only common thing between the users, if you don't ha...
I have a List<> of objects that I have bound to a ListBox. I then want to bind properties of the SelectedValue to various TextBoxes. The behavior is very screwy though.
When binding the Name (a string) that is used as the DisplayMember for the ListBox, it doesn't update the ListBox and if I try to refresh the binding on the TextChanged ...
Possible Duplicate : Write to CD from .net
I have a data file in f:\ drive named 'cd.txt'.
I want to write this file to a CD i.e E:\.
String source ="F:\\cd.txt";
String destination="E:\\cd.txt";
File.copy(sorce,destination);
The above line is throwing exception saying "Access to the path 'E:\cd.txt' is denied".
What is the soluti...
I have a project and I want to strong name the executable file. Using command-line compiling works well:
csc ... /keyfile:...
But I would like the IDE to do this, so I find this: in project property's `Signing' tab, there is a 'Sign the assembly' option. I tick it and direct to my key-pair file. After I lauch the debug, a FileNotFo...
Hi,
Does anybody knows how to have an open folder dialog in Silverlight?
Any third party controls?
I know there is a OpenFileDialog but this is not what I'm looking for. I want a dialog for folders only.
Thanks.
...
Dear ladies and sirs.
I have the following code snippet:
using (var scope = DataAccessPortal.DataContext(DB.Main).OpenStatementScope())
using (var transaction = scope.BeginTransaction())
{
// Several other database operations.
if (scope.ExistsById(obj.GetType(), obj.Id))
{
scope.Update(obj);
}
else
{
scope.Insert(ob...
I want to strong name a managed application which references many managed assemblies and ActiveX and COM components (written in C++) via interop. And because a strongly named assembly cannot reference weakly named assemblies, could you please tell me what problems that I should be prepared for, what you have run into, especially when de...
I have simple chat program using WCF service. One service use for server and another use for client. Those services connect to each other and call each other. For hosting server, I used a windows service and for client I host WCF service in a Windows app. After all I found that this code work on simple computer, but when move server serv...
I dont understand why var m does not return Match. I havent checked but it seems to be returning an object.
foreach (var m in Regex.Matches("dummy text", "(mm)"))
var sz = m.Groups[1]; // error CS1061: 'object' does not contain a definition for 'Groups' and no extension method 'Groups' accepting a first argument of t...
Hi,
We are currently building an application that needs to communicate to some IBM WebSphere queues. At the other end of the queues there is another world. Due to some unknown circumstances (for me), connecting to the MQQueueManager takes 17 seconds every time, but sending and receiving messages afterwards through the queues is not a ...
I'm looking for a search solution and i can't seem to find it.
It's meant for a website that offers over a million products of different types that should be searchable.
Products are stored in a database with a complex structure (a product property is not mapped directly to a table column) so i think it's easier to use a crawler than a d...
Is there any way to force control validation in .NET CF? In full .NET there is the Validate() method, but it is missing from CF.
I'm trying to make a control bind data back to the model when closing the form, but clicking the main menu button doesn't seem to steal focus from the control and the Validating and Validated events don't fir...
Hi All,
i Downloaded BingWM6.CAB from http://mobile.search.live.com/client/download%5Fmanual.aspx for bing maps showing in windows mobile.
I installed that application in windows mobile emulator its working fine but i need to know which services are using for accessing map controls and posing locations on map control?
I tried but i di...
I have a class library that uses some xml files found in its own directory.
When referencing this library from another project, how do I ensure the library is working from it's own directory?
I tried Assembly.GetExecutingAssembly().Location but that still returns the path of the startup project.
...
I like the ToolStripProfessionalRenderer style quite a lot, but I do not like the way it renders a ToolStripTextBox. Here, ToolStripSystemRenderer does a better job IMO. Now is there a way to combine both renderers' behaviour to use system style for text boxes and pro style for everything else? I have successfully managed to use pro styl...
Suppose i have input array
byte A[50];
i have put three diffrent data types values in array
as below
string of length 42 bytes(converted into binary)
long with length 4 bytes(converted into binary)
float with length of 4 bytes(converted into binary)
Now i have defined a schema like as below
<schemaforparsing>
<field>
...
In C# , How can i create a System.Drawing.Color object using a value like this #FFFFF,#FGFG01 etc...
...