.net

How to remove one of the wsdl bindings from a wsdl

I have created a wsdl. But it has created two wsdl bindings. How can I remove one of the bindings froma wsdl. ...

[WPF] Is it possible to make ItemsControl smart enough to change DataTemplate according to different data?

Hi, This might be a crazy question. Suppose a collection that has a a few entries, some of them are just empty string. Is it possible to write the ItemsControl to use different DateTempalte if the content is empty string? Thanks a million times ...

Ideal Release Methodology, Tools, Structure

I'm at a firm that currently does releases in a very slow, manual way: Each deployable project has an installer. Once the release is ready, somebody remotes into the server and runs each installer. I know there are better ways, and I've built better ways, but I want to present a way that is so stellar, so clear, and so easy that nobod...

WinForms controls get dislocated everytime the form is viewed

I'm stumped by some bizarre behavior in Visual Studio's forms editor. I have seen this on a couple of different forms in my application. Each time I open the form in Visual Studio's layout editor some controls will be in a different location than when I left them. Typically some buttons move up just a little bit from the lower right c...

What serialization method is used for an ActiveMQ NMS C# object message?

I'm planning on using Apache NMS for ActiveMQ messaging, and am wondering what serialization method is going to be used on the objects I send? XML/Binary? What controls the serialization and how can I customize it? Does anyone have experience doing this with C# objects? Are there any pitfalls that you know of? ...

Implement Word Spell check in Windows Form App

I have an In-house windows form app that I would like to use Spell Checking in. Everyone has Office 2007 installed so I shouldn't have an issue there but I am having trouble getting this to fully work. Here is what I have: using System; using System.Collections.Generic; using System.Linq; using System.Text; using Word = Microsoft.Offi...

Why doesn't parent object fail with a previously disposed child object?

Potentially embarrassing question, but there is obviously something I'm missing that I want/need to know. I expect the following code to create a new table row with new cells to be rendered later. And that's what it does ... as you would expect. using (TableRow tr = new TableRow()) { using (TableCell td = new TableCell()) { ...

IDisposable chain

If I implement a object with IDisposable, should all objects that own that object implement it as well, even if they have no other resources to release? ...

disable/hide script manager

I am using scriptmanager on a mobile site but due to massive amount of data page gets from couple of script sources it loads slow on older phones. I have a class where I deduct phone capabilities and set page target. What I am after is to remove links to ScriptResource.axd or some other Ajax method to post retrieve data with partial upda...

regex help for replacing space in <span></span> tag with &nbsp;

Hi, trying to use regex to replace any white space with "&nbsp;", inside of example html <span someattr="a">and some words with spaces</span> It's a desktop app and this html is coming to/from a third party control and don't have the luxury of working with any type of html parsing so am stuck with regex I can't seem come up with a r...

Logging in to eBay using HttpWebRequest

I'm trying to log in to my eBay account using the following code: string signInURL = "https://signin.ebay.com/ws/eBayISAPI.dll?co_partnerid=2&amp;siteid=0&amp;UsingSSL=1"; string postData = String.Format("MfcISAPICommand=SignInWelcome&userid={0}&pass={1}", "username", "password"); string contentType = "application/x-www-form-urlencoded"...

Concerns about SQL Server 2008 Full Text Search

I have built a T-SQL query like this: DECLARE @search nvarchar(1000) = 'FORMSOF(INFLECTIONAL,hills) AND FORMSOF(INFLECTIONAL,print) AND FORMSOF(INFLECTIONAL,emergency)' SELECT * FROM Tickets WHERE ID IN ( -- unioned subqueries using CONTAINSTABLE ... ) The GUI for this search wi...

deployment strategy on .NET app that uses COM objects

Hi guys, I have a question regarding the deployment strategy on a .NET app. In my app, I'm using DSO (decision support objects), it's a COM dll that is used to access an Analysis Services Server (version 2000). I've referenced the COM from the solution, and Visual Studio (actually the tool behind) nicely created a .net assembly that w...

Insert Records into Sqlite DB using ADO.NET Entity Framework?

I'm tring to insert some records into my Sqlite database using the Entity Framework. I do not have a problem connecting to the database or mapping to the database. At least, I don't think I do. When I call "SaveChanges" an exception is fired that states: Unable to update the EntitySet 'RawReadings' because it has a DefiningQuery and ...

How .NET differentiates reference vs primitive and value types

.NET we have primitive datatypes like int and value types like struct. And also we have reference types. All of them seem to be derived from object class. How .NET determine primitive, value type against the reference type? Where it is done? At compiler or at JIT? Does this belongs to the capabilities of the compilers? ...

Looking for .NET software to abstract SQL Server's Contains Syntax

I am using SQL Server 2008 Full Text capabilities for the first time. I like the features that CONTAINS and CONTAINSTABLE offer, but I don't expect my users to learn the syntax for looking for inflections, using phrases, proximity, etc. My GUI will have a single text box to search with. Is there anything (.net DLL or c# code) out there ...

Recommended Tutorials and videos to learn nunit testing in short time

Can you Recommended Tutorials and videos to learn nunit testing in short time. I know that there are a lot of good books talking about unit testing, but i just want to learn it short and i will go more deep using these books later. So if you know some good videos or nice tutorials, please share. ...

Trying to understand the lifetime of the AuthorizationContext object

Hello, I have a simple authorization setup that checks for certain configured active directory roles in a custom authorization policy (IAuthorizationPolicy) - and adds claims if those roles are possessed. On top of that, I have a subclass of ServiceAuthorizationManager which overrides CheckAccessCore. It verifies possession of some of...

Regex for Comma Separated Number

I'm trying to validate user input, which is just comma separated numbers. I'd like to do this with RegEx, but can't come up with the right expression. It should validate the following strings (and larger): 1 12 123 1,234 12,345 123,456 and invalidate the following strings (and crazier): 1,1 1,12 12,1 12,12 123,1 123,1 Any help wou...

Sorting a dataset with a dataview

This code correctly fetches data, and displays it; however, the sort is completely ignroed. DataTable dt = f.Execute().Tables[0]; dt.DefaultView.Sort = summaryColumn; rptInner.DataSource = dt.DefaultView; rptInner.DataBind(); Is there something I can do to force the view to sort itself? (f.Execute() returns a dataset with at table a...