I need to get datetime from SQL table but I have two problems:
I need to refer to string from selected cell of DataGrid. I've tried "bksDataGrid.CurrentCell.Item" but that doesn't work.
Not really problem, but the cmd will return SQL datetime as object. Is it possible to convert it to .NET DateTime?
object obj = new object();
...
So I know how to replace newlines in my C# code. But replacing a newline for a <br /> tag isn't always very correct.
So I was wondering what kind of strategy do others use? The correct way I guess would be to use <p> tags and <br /> tags.
Here are some examples of the results I would like to get.
If there is no newline I want the te...
Is it possible to configure a WCF proxy such that it is able to understand SOAP 1.1 and SOAP 1.2 messages at the same time? In other words, I want to be able to connect to a web service that may return at any time, SOAP 1.1 or 1.2 based messages.
Thanks.
...
Is it possible to restore a 3rd Party application which has been minimized to the SysTray?
Calling ShowWindow is fine on apps minimized to the TaskBar but where the app has been minimized to the SysTray it appears its handle gets set to zero, and of course ShowWindow can't find it.
...
is this the optimal way of doing a 4 bits circular shifting?
n << 1 ^ 0x10 | n >> 3
I was only testing with number that was actually "working"!
...
i have 1 a.master page and 1 b.aspx with its b.aspx.vb page. I have the following property in the a.master.vb
Public Property Page_Title() As String
Get
Return title_div.InnerHtml
End Get
Set(ByVal value As String)
title_div.InnerHtml = value
End Set
End Property
in the b.aspx.vb page i have
DirectCast...
How can I load the following formatted XML document:
<Settings>
<MimeTypes>
<MimeType Type="application/mac-binhex40" Extensions=".hqx"/>
<MimeType Type="application/msword" Extensions=".doc;.docx"/>
<MimeType Type="application/pdf" Extensions=".pdf"/>
<MimeType Type="application/vnd.ms-excel" Extensi...
We have a vendor who is writing an application for us who makes use of a dll I've provided to them. My boss just found out that if we ever need to make a change to one of our dll's we'd have to provide the updated version to the vendor so they could recompile their project. This causes problems because we don't have automated testing a...
Hi,
I'm creating an application that uses Microsoft's Ribbon but I'm having issues with the RibbonContextualTabGroup. When this tab appears it changes the title text specified in the ribbon properties to "E.....", is there a way round this?
Here's my code:
<r:RibbonWindow x:Class="Sample.MainWindow"
xmlns="http://schemas.micros...
HttpServerUtility contains a public function called UrlEncode. It is not a shared function. HttpServerUtility does not have any public constructors.
Doing this fails:
Dim encodeMe As String = "a string to be encoded!"
HttpServerUtility.UrlEncode(encodeMe) 'Bombs out
This works, and is how Microsoft says to do it:
Dim instance As...
I'm having a devil of a time selecting the value of a single element in my XML document
My document looks like
<?xml version="1.0" encoding="utf-8" ?>
<MySettings>
<AttachmentsPath>Test</AttachmentsPath>
<PendingAttachmentsPath>Test2</PendingAttachmentsPath>
</MySettings>
I've tried to do the following:
XElement mySettings = X...
Hi,
I have a Dataset and want to display the containing rows in a WPF-Contorl. The problem is, that the control is sort of a circuit diagram. Thus I created a template to show the values and placed multiple instances of it in my circuit control. Currently the XAML-code in the circuit looks like this:
<Label Content="{Binding Path=.[0]}"...
I'm trying out the DateTime.TryParseExact method, and I have come over a case that I just don't get. I have some formats and some subjects to parse that each should match one of the formats perfectly:
var formats = new[]
{
"%H",
"HH",
"Hmm",
"HHmm",
"Hmmss",
"HHmmss",
};
v...
It seems that using svcutil will not generate the TransactionFlow attribute.
Looking at the generated class, we see that it is missing.
Is there a fix for this ?
EDIT:
more info, I'm running svcutil against a dll to get the metadata and then run svcutil /t:code against that metadata for code generatino.
I've notice that running ...
I have a project where I am using EFv4 to save data back to my repository. This is working as expected for the simple properties on my object but does nothing for the related objects.
For example, I have a User object and a related property Roles that is a collection of Role entities.
If I update the User's lastActivity date and the...
I'm using com interop to talk to some physical piece of hardware.
When I need the current reading from the hardware I have a nice elaborate piece of threading code that keeps it off my UI thread so that I don't lock up the UI while I query the hardware since sometimes it can take as much as 1-2 minutes (although usually more like 1-5 se...
I have a list of UTF-8 strings that I want to sort using Enumerable.OrderBy. The strings may contain any number of character sets - e.g., English, German, and Japanese, or a mix of them, even.
For example, here is a sample input list:
["東京","North 東京", "München", "New York", "Chicago", "大阪市"]
I am confused as to whether using String...
I need to convert a Bitmap from PixelFormat.Format32bppRgb to PixelFormat.Format32bppArgb.
I was hoping to use Bitmap.Clone, but it does not seem to be working.
Bitmap orig = new Bitmap("orig.bmp");
Bitmap clone = orig.Clone(new Rectangle(0,0,orig.Width,orig.Height), PixelFormat.Format24bppArgb);
If I run the above code and then chec...
How can breakpoints be enabled or disabled at runtime? I'm writing a test workbench application that can run other .net code for the purposes of debugging plugins. The workbench app itself is not debuggable (DebuggableNonUserCodeAttribute) but the user code that it calls should be. But then, under certain circumstances at runtime, the...
I am very new to XSLT, and the first thing that i need to do is parse a 300MB file (and that's on the small end). The XSLT is not that complex for the moment, it's just removing some nodes that match a certain criteria.
I have two problems:
It's too slow. It takes 50 seconds to process 500,000 records and that's not fast enough.
It c...