Hi,
I am developing an application that is hosted on a SQL Server 2005 failover cluster. The application (developed using C#, .Net 2.0) makes use of a number of the clustered resources (printers, file shares, etc). I would like to set up a testing environment that replicates the cluster. However, the current test environment has only...
Does anybody know of a freely available .NET HTML DOM Parser?
...
Hi,
What is strong naming and how is it useful in .Net
...
I'm just trying to quickly debug a webservice by printing out the contents of an int and string array. Is there anyway to do this in one method?
I tried
public static string ArrayToString(object[] array)
{
StringBuilder sb = new StringBuilder();
foreach (Object item in array)
{
sb.Append(item.ToString());
sb.Appe...
Hi all
I've taken a few school classes along time ago on and to be honest i never really understood the concept of classes. I recently "got back on the horse" and have been trying to find some real world application for creating a class.
you may have seen that I'm trying to parse a lot of family tree data that is in an very old and ant...
In all my Page_Load() events I have to do a
if(!IsPostBack)
{
//code runs on initial get
//Set properties backed by viewstate
}
else
{
//Code runs on each get and post
//Set properties backed by ordinary fields
}
Is there any quick way to determine this short of reflector, reading documentation, or creating a test page?
Is i...
I have some VSTO code which generates a Word 2003 document by copying and pasting selected sections from a source document:
Dim doc = Globals.ThisDocument.Application.Documents.Add(DocumentType:=Word.WdNewDocumentType.wdNewBlankDocument, Visible:=False)
For Each sectionNumber As Integer In requiredSections
sourceDoc.Sect...
Just came across a weird error:
private bool GetBoolValue()
{
//do some logic and return true or false
}
Then, in another method, something like this:
int? x = GetBoolValue() ? 10 : null;
Simple, if the method returns true, assign 10 to the Nullabale x, otherwise, assign null to the NULLABLE int. However, the compiler complains...
When I press F1 in Visual Studio 2008, I would like to start .NET reflector and navigate to the selected class/method (instead of waiting for the Visual Studio documentation to start up).
Is it possible to configure Visual Studio in that way?
Follow-up question:
how to determine the type/assembly under the caret (as described in x0...
I'm trying to split an app.config file into multiple files to make it easier to manage the differences needed for different environments. With some sections it was easy...
<system.diagnostics>
various stuff
</system.diagnostics>
became
<system.diagnostics configSource="ConfigFiles\system.diagnostics.dev" />
with the "various s...
When I assign multiple domains to directories in my GoDaddy hosting account management it creates a virtual directory for these domains. It also makes those domains go to that directory. For some reason, sometimes it forwards back to the full path of the hosting account.
ie.,
I have domain abc.com in folder /_sites/abc.com/, and if I ...
I'm trying to load an external XAML file using this code:
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/OfficeStyle;component/OfficeStyleWindow.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictiona...
I would like to append one DataTable to another DataTable. I see the DataTable class has two methods; "Load(IDataReader)" and "Merge(DataTable)". From the documentation, both appear to 'merge' the incoming data with the existing DataTable if rows exist. I will be doing the merge in a data access layer.
I could could usa an IDataReader ...
It's easy to create a hyperlink that passes parameters using GET by adding them to the URL:
http:\somesite.com?name=fred
but the web service I'm connecting to uses POST. What's the best way to do this in Sharepoint?
...
Hello everyone,
I am using IIS 7.0 + Windows Server 2008 x64. I have installed .Net Framework 3.5 on my machine, but from IIS 7.0 application pool .Net framework settings, I could only set version to v1.0 or v2.0, why I cannot set to version v3.5 -- which is the latest version of .Net framework I installed on my machine?
thanks in adva...
Hi every one,
i wrote some code to crop large image to small one.
Everything is OK but when i tried GIF images i get the following exception
"A Graphics object cannot be created from an image that has an indexed pixel format."
I'm using Graphics class to do this
Graphics gfx = Graphics.FromImage(croppedBitmap)
thank you.
...
I'm creating a HtmlHelper extention that should create a set of links pointing to the current URL, but that have a different language code as their first parameter.
The languagecodes are passed in as a list.
Currently I require the UrlHelper to be passed in and do the following:
/*Warning: HACK*/
RouteValueDictionary vals = html.ViewCo...
I have an XmlTextWriter writing to a file and an XmlWriter using that text writer. This text writer is set to output tab-indented XML:
XmlTextWriter xtw = new XmlTextWriter("foo.xml", Encoding.UTF8);
xtw.Formatting = Formatting.Indented;
xtw.IndentChar = '\t';
xtw.Indentation = 1;
XmlWriter xw = XmlWriter.Create(xtw);
Changed per ...
I have very little to go on here. I cant reproduce this locally, but when users get the error I get an auto email exception notification.
Message: Invalid length for a Base-64 char array.
Call Stack: at System.Convert.FromBase64String(String s) at System.Web.UI.ObjectStateFormatter.Deserialize(String inputString) at System.Web.UI.Obje...
Can anyone recommend a good book which covers IL programming, specifically using Reflection.Emit in C#?
Thanks!
...