How do I get the path of the current assembly? I need to get data from some paths relative to the location of hte current assembly (.dll).
I thought someone told me to use the reflection namespace but I can't find anything in there.
Thanks,
Scott
...
I am just getting started using any DI/IoC toolset and have a very basic question. I am using Unity as we will also be using a number of the Enterprise Library blocks throughout the application.
The question that I have is around the dependencies to .NET framework classes. For instance, in one of the classes that I am working on curre...
I'm using ADO.Net to work with an Excel Document. Essentially, I'm looking up values in a table called "source" and creating a new table called "result" which will be populated with the results of my query.
I have a couple of questions..
A) How can I check if a table exists
and create a new one if it doesn't?
B) Is a table the same ...
I've done some XML serialization before but i used Attributes, I'm not sure this is doable for my next assignment, here's a brief list of XML manip requirementes.
General Purpose XMl manipulation, tied to a treeview, no schema.
Load/Save XML.
Load/Save Attributes as well as Values (i believe the term is Element Text?), and be mindful o...
I need to get the ID of a dropdownlist (ASP.Net Control) So that I can tell if an item has been selected.
Right now I am trying to just write the count of the dropdownlist to an alert box as follows:
OnClientClick="alert(document.getElementID('<%=ListBox1.ClientID %>').options.length)
The error I get is 'document required.'
...
I have written a java axis2 1.4.1 web service and .net 3.5 WCF client and I am trying to catch the wsdl faults thrown.
Unlike .net 2.0 the .net 3.5 claims to support wsdl:fault and the service reference wizard does generate all the correct fault classes in the client proxy. But when I try to catch a fault it doesn't seem to correctly s...
Is there work on implementing a .NET version of the OSGi plugin architecture (or something similar)? I have only found this paper, but no real library. Any pointers?
...
I have been using the ROWLEX library to handle RDF-s. It is shipped with a designtime GUI tool called OwlGrinder.exe that can generate C# helper classes (.NET assemblies to be exact) from my OWL ontologies. I wonder if anyone knows if I could do the same programatically in runtime.
...
Is there a way to have visual studio automatically copy files I save in a project to another location? I'm not looking for source control functionality, more along the lines of "automatic deployment". I work on my local machine but I want the files to automatically be tossed onto my dev box every time I edit them. Is there a way to do th...
Hello I have a asp.net webpage, it has two search fields with separate submit buttons.
I'd like to allow the user to enter some data into one of the fields and then press the enter key and it submit using the appropriate button. Right now, the enter key submits for the first submit button, but I want this to change if there is data in t...
After running the YSlow plugin on a site, I saw that one of the recommendations was to add far future expires headers to the scripts, stylesheets, and images.
I would like to do this, does anyone have experience with this? I am using IIS 7 and I read an article from Microsoft but am not interested in disabling caching for asp pages o...
Do you know if there's a way?
I've used this library to access a pop3 server, but it doesn't work with an exchange server.
Do you know of any other library or piece of code that'll show me how to do it?
I cannot change any settings on the server.
...
Read before downvoting or closing: This almost exact duplicate of a previous question of mine exists with the solely purpose to rephrase the previous question to the Linq-To-Sql scope. All answers contained in the previous question are valid for the Linq scope, but are invalid in the Linq-To-SQL scope.
Suppose I have the two following L...
I am trying to check if a process is running on a remote system. I am using the following code:
string procSearc = "notepad";
string remoteSystem = "remoteSystemName";
Process[] proce = System.Diagnostics.Process.GetProcessesByName(procSearch, remoteSystem);
However, when I try to run the code, I get the following error: "Couldn't c...
I'm trying to print a DataGrid in a windows forms app and when the width of the columns is set (it's customizable) too narrow to fit the text it just truncates the text instead of wrapping it. Is there a property in DataGrid that sets text wrapping?
I've added some code to perhaps help with diagnosis of the issue.
private void PrintRow...
I am testing a static method that builds a URL string after checking proxies and hostnames and all kinds of things. This method internally relies on the static flag System.Net.Sockets.Socket.OSSupportsIPv6. Because it's static, I cannot mock this dependency.
EDIT: (This is simplified down a lot... I can't modify the structure of the met...
I have a bit of a weird problem.
I have a form with a Label in it for outputting text at certain points in the program instead of console output.
Given the following code:
result = SetupDiGetDeviceRegistryProperty(deviceInfoSet, ref tBuff,
(uint)SPDRP.DEVICEDESC,
...
I'd hate to reinvent something that was already written, so I'm wondering if there is a ReadWord() function somewhere in the .NET Framework that extracts words based some text delimited by white space and line breaks.
If not, do you have a implementation that you'd like to share?
string data = "Four score and seven years ago";
List<st...
I'm attempting to send an email and instead of sending 5 individual emails to each person, I would like to send one mass email to all 5 people. The difference here is that I want everyone to show up in the "TO" or "CC" lines. How can I do this?
...
I am using Global.asax to perform logging at the end of each request via the Application_EndRequest event. However, I am seeing some odd behavior of certain values stored in the HTTPContext.Current.Items collection.
Below is the debug output for a nullable Enum. You can see that there is a value, but HasValue resolved to False?!
{Syst...