Manish Pansiniya's Blog

.NET, C#, Javascript, ASP.NET and lots more…:)

Archive for the ‘WPF’ Category

Change the method’s message name using WebMethodAttribute or change the type’s root element using the XmlRootAttribute."

with one comment

We have just received the error when we tried to return a type which contains Response behind it.


We have webmethod, UpdateStatus and we have following signature

Public Function UpdateStatus(….) as UpdateStatusResponse

But it gives us above exception when I try it using URL to access the service. Then after some debugging and googling, I found that, .NET uses internal class that uses UpdateStatusResponse. If I change the name to UpdateStatusResult and error gone Smile


Written by Manish

May 26, 2011 at 4:26 pm

Easy way to understand LINQ

leave a comment »

There are many videos and tutorials on LINQ. And i am adding one more to the list. I am not going deeply in LINQ but just giving basic syntax understanding of LINQ.

Following is the description of LINQ

from [identifier] in 
where [boolean expression]
order by [[expression](ascending/descending)], [optionally repeat]
select [expression]
group [expression] by [expression] into [expression]

These LINQ query returns the IEnumerable collection. Let us go line by line into the same.

First line is similar to declaring variable. Here you are declaring variable for your data collection. But this data collection is filter of your source collection. Let’s take one example

var q = from c in contacts

        where c.State == "WA"

        orderby c.LastName, c.FirstName

        select c;

Now, here c is variable and it is subset or equal to contacts. So whenever you have collection from which you want to make queries, first line would be from <Identifier> in <collection>

From next line everybody use expression (Not facial but technical 🙂 ). This expression must use identifier you have defined in the first line. So in above example, you can see that WHERE and ORDERBY uses c to create expression. c has same members which your source has. Suppose you have contact collection named contacts. And you wrote first line like “from c in contacts” then c contain all the members of contact. Visual studio provide Intellisense using which you can easily create the expression. Where takes boolean expression, while order by take just simple expressions.

Once you have setup the LINQ query, you need to select the collection. It would be simple identifier or may be columns from identifier. One more example for understanding is as follows:

int[] nums = new int[] {0,4,2,6,3,8,3,1};


var result = (from n in nums

              where n < 5

              orderby n

              select n).Distinct();

This is just a very basic understanding on LINQ. But its really vast and if you need to go in bit detail, follow Nice website for LINQ :).

Written by Manish

March 23, 2009 at 2:48 pm

Posted in .NET, .NET 3.0, WPF

Ajax Toolkit – Are you guys using it or not ???

leave a comment »

AJAX TOOLKIT for 3.5 is just released. I have seen very much in details the controls which toolkit offers and yes, they are really great piece of controls which aid help is doing quick work professional way. (Just look at the sample if you haven’t looked at the same.)

Personally, as i am currently working on CAD/CAM windows based software, I am unaware of most of web technology currently. Recently i read jQuery and next in line is ASP.NET MVC architecture. But I have subscribed many blogs and reading many newsletter, they never discussed or mentioned anything about this toolkit.

Are you guys using it or not ??? Why ???

Written by Manish

March 21, 2009 at 9:00 pm

Posted in .NET, .NET 3.0, WPF

Free ASP.NET MVC Book From Scott and Rob

leave a comment »

a FREE ASP.NET MVC book and a FREE sample website (talked about in that book) that’s also a live working site as opposed to vaporware.bookcover

The book is the first 185 pages of a book Rob collaborated on with ScottGu, Scott Hanselman, and Phil Haack. The cool part is that these pages (the free stuff) are all ScottGu’s contribution and are a “0 to 60” summary of getting up to speed with ASP.NET MVC from “File—>New” to dependency injection.

The code is now available up on Codeplex and can be downloaded for all to see!


Also, ASP.NET MVC 1.0 is officially released by Microsoft. So grab it now and learn it 🙂

Technorati Tags: ,,,,,,

Written by Manish

March 20, 2009 at 7:06 am

Posted in .NET, .NET 3.0, WPF

Tagged with

Expression Blend : Conclusion – WPF Tutorial #10

with 2 comments

Hope you have visited overview section from 1 to 9. I am skipping other chapters from the UserGuide as I believe once you complete the basic part of Expression, you need to look into the WPF+XAML from the first. And once the WPF is completed or overviewed, you can jump to the remaining expression blend part later. Hope you enjoyed the tutorial. I believe we can continue the same for WPF+XAML section. You can get more on Expression blend on following URL if you need

Written by Manish

October 25, 2007 at 1:31 pm

Posted in .NET, .NET 3.0, WPF

Expression Blend : Transformations – WPF Tutorial #9

with one comment

This transformation topic only covers the transformation in the view of Expression Blend. There are following simple transformation which you can get in any image manipulation software.

  • Reposition
  • Resize
  • Rotate
  • Skew
  • Flip

Now, how these transformation applies to the object is depend upon which category of transform you are using. Following is the transformation category:

  • RenderTransform   The transformation is applied after the layout pass is complete. Using the Selection tool to transform an object on the artboard modifies the RenderTransform properties.

    Using the RenderTransform properties is the ideal way to perform transformations on objects because of better application performance.

  • LayoutTransform   The transformation is applied in memory during layout, before the application is rendered on screen. Use the LayoutTransform properties when you need a parent element to adjust to the transformation applied to a child element.

Following example is taken for Adam Nathan’s book:


This clears the understanding of RenderTransform and LayoutTransform easily. Thanks to Nathan for this.

Last point is cliptobounds property of the control. If that property is true, the control which you transform is clipped into the parents object.

Written by Manish

October 22, 2007 at 1:42 pm

Posted in .NET 3.0, WPF

WPF Unleashed! Released – One of Nice book to refer for WPF

leave a comment »

I just reviewed different books on WPF. I find Nathan’s WPF unleashed very useful book for learning WPF. You can skip chapter 2 and 3 as that chapters can be boring. You can cover that chapter after going through other chapters.

Just Bring a COPY , read it and finish WPF as soon as possible !!!

Written by Manish

October 22, 2007 at 6:12 am

Posted in .NET 3.0, WPF