.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

DataContractSerialization - View the serialized data

Posted By:      Posted Date: August 28, 2010    Points: 0   Category :.NET Framework
I am trying DataContractSerialization for the first time and I would like to see the results of my serialization. Some fields seem to be missing, and it is difficult trying to debug it without being able to see what is being serialized. I have tried both the CreateBinaryWriter and tried the CreateTextWriter with the hope I could view what it serialized: Dim str As New MemoryStream() Dim dcs As New DataContractSerializer(GetType(CustomerAccount)) 'Using w As XmlDictionaryWriter = XmlDictionaryWriter.CreateBinaryWriter(str) ' dcs.WriteObject(w, Me) 'End Using Using w As XmlDictionaryWriter = XmlDictionaryWriter.CreateTextWriter(str) dcs.WriteObject(w, Me) Debug.WriteLine(w.ToString()) End Using In either case, I cannot find a way to view the results with actually deserializing back to an object. (I have used the XMLSerializer in the past and it was always easy to see the result of the serialization without actually deserializing.) Any tips would be appreciated.    www.insteptech.com ; msmvps.com/blogs/deborahk We are volunteers and ask only that if we are able to help you, that you mark our reply as your answer. THANKS!

View Complete Post

More Related Resource Links

Vista and Office: View Data Your Way With Our Managed Preview Handler Framework


Stephen Toub shows you how to write your own Preview handlers for Windows Vista and Outlook 2007.

Stephen Toub

MSDN Magazine January 2007

Disable filtering on a Dynamic Data list view.


I have an entity set of NotificationTemplates, and each one of these has a collection of zero-many SmsTemplate entities. When editing or viewing a NotificationTemplate, I have a link to View SMS Templates. That link takes me to a List view for the SmsTemplates entity set, filtered for the NotificationTemplate I was viewing.

How can I prevent the user changing this filter to show SmsTemplates for another NotificationTemplate? That is, I want the filter, but it must be read only. The drop-down just mustn't drop down, it must just display the name of the NotificationTemplate that these SmsTemplates belong to. To view SmsTemplates for another NotificationTemplate, the user must click View SMS Templates from that other template.

This was originally asked by myself on SatckOverflow at: http://stackoverflow.com/questions/3514373/disable-filtering-on-a-dynamic-data-list-view

show data in grid view error Arithmetic operation resulted in an overflow.



i have a table there is 17 columns in 17 column 3 are number and other are varchar . when i try to display all data of that column error occures.

one more intersting think is when i try to display 6 column then grid show there data an no more error occures. 

when i run my project this error occures in grid view

Arithmetic operation resulted in an overflow. 

Entity Data Model and database view returning the same columns as there are in a table


When adding a stored procedure into the Entity Data Model I can select whether the procedure returns a scalar, a (new) complex type or one of the entity types I already defined. 

How do I do something similar for a view?

I mean assuming I have a view like this

CREATE VIEW FilteredFoos as SELECT Foo.* FROM Foo join ... WHERE ...

(that is a view that implements some involved filtering, but returns all columns from one table) how do I add it to the project so that I can use the entity set, but get the Foo objects, not some new FilteredFoo objects.

var foos = myDB.FilteredFoos.Include("Bar").ToList();

foreach (Foo foo in foos) { ...

Thanks, Jenda

How to create scrolling table for columns in a SharePoint Designer Data View


I have a fairly complex SharePoint Designer 2007 Data View they have added two more requirements.

1. Have the columns on the right side be able to scroll left to right as there is a large number of columns, while the first 3 columns on the left side stay locked in place.  This is only one list not two, and because of some other requirements I have it must remain to be just one list.

2. Then they also need to have scrolling up and down of the entire list with the headers locked in place.

The first requirement is more important than the second, but preferrably I need to do both.

I am new to XSL so not familar with the syntax. Is this something I can do on a custom Data View? Does anyone have any examples of how?

I have a drawing that show how it needs to look but I don't see an option here to upload a graphic.

So here is a link to my graphic example uploaded to my blog area: http://lindachapman.blogspot.com/  or just the image here: http://4.bp.blogspot.com/_aB01ue__NvQ/TGL42MOvrGI/AAAAAAAAAA4/c3xP4uCy4BU/s1600/Scrolling.png

I failed to mention that 3/4 of the columns are HTML Calculated fields wh

Add page numbers for paging in data view web part


Hello all,

Has anyone found a solution that will allow me to have page numbers for paging in a data view web part. For instance, if I have 40 items/rows and I set the paging to display 10 items, I'd like the paging to show 1 2 3 4 rather than showing 1-10 and having to click next over and over to get to a specific item.

I found this article, but it is for 2003 and doesn't seem to apply to 2007 or if it does I am not able to really figure out how.


Please help!

Thanks in advance.


MVC view displays Preveously loaded data only



1. May be it loading page either from History or Chache memory.

2. When anonymous user open about-us page or Home page then we display only 4 menus. And immediatly Normal user logs in and

open about-us page or Home page it again display only 4 menus instead displaying all menus available for registered user. I

have used the PartialView and render it in Master page(use the code Html.RenderPartial("Menus")) see the following code...

<%@ Control Language="VB" Inherits="System.Web.Mvc.ViewUserControl" %>
<%: ""%>
<div id="menucontainer">
    <ul id="menu">       
            <%  If Request.IsAuthenticated = False Then%>
                <li><%= Html.ActionLink("Home", "Index", "Home")%></li>
                <li><%= Html.ActionLink("Register", "Register", "Account")%></li>

Data Mining - Business User's view

Using BIDS, when I create a Mining model solution I can see lot's of useful utilities like Mining Model viewer, Mining Model Prediction etc that comes with lot's of graphs' etc. What would be the best approach to display these graph's to business users. Can I do this efficiently using SSRS or Do I need to use PowerPivot etc..

Rendering Partial view postback with data posted back and entire view context

This is the base Index.aspx view:<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %> <%@ Import Namespace="LMWebUI.Components" %> <%@ Import Namespace="LMWebUI.Models" %> <asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server"> </asp:Content> <asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server"> <% Session["HasScripts"] = "false"; %> <% if (Utility.FixNull(Session["LoggedIn"],"false") == "false" ) {%> <% ViewData["Login"] = new PartialRequest ( new { controller = "Account", action = "LogIn" } ); ((PartialRequest)ViewData["Login"]).Invoke(ViewContext); %> <%} else {%> <div>Logged In Content here</div> <%}%> <script type="text/javascript"> LMx.init(); </script> </asp:Content> This is a helper class> that I found elsewhere, doesn't solve the problem, but still works to display the viewpublic class PartialRequest { public RouteValueDictionary RouteValues { get; private set; } public PartialRequest(object routeValues

Calculated date field displays differently in List View and Data View web parts

In SharePoint GUI I created a simple custom list with a calculated Date/Time field (Due).  The calculation is =[Created]+7.  I'm trying to display this data on a page using a DVWP.  But first, for testing purposes, I also created a second calculated Date/Time (TestCreate) field in my custom list that is simply =[Created]. In the List View from within SharePoint, the dates show as expected (for example): Created = 8/12/2010 3:45 PM Due = 8/19/2010 3:45 PM TestCreate = 8/12/2010 3:45 PM In SharePoint Designer, I added a Data View web part and the above three data elements (each configured to display mm/dd/yyyy hh:mm:ss tt).  I see the time displayed for the example list item as: Created = 8/12/2010 3:45:30 PM Due = 8/19/2010 10:45:00 AM TestCreate = 8/12/2010 10:45:00 AM I've tested a couple scenarios and the calculated fields always display five hours in the past (along with dropping the seconds).  It seems like the DVWP is returning the date in a different time zone (with no seconds).  The lcid is set right (1033).  I didn't see any time zone settings for the DVWP specifically.  I'm basically stuck.  Could someone help me figure this one out. Thanks.

Handle anchor tag when there is no data in data view

HI, I have a DataView Web part on my page.Announcements Data is binded to Data view and below the Dataview web part i have a anchor tag(See all Announcements link) which redirects to all announcemnts to a different page. Anchor tag is not a part of Data view....It's a seperate tag on the page My requirement is i don't want to show the All Announcements Link when there is no data. Is it better to have a CEWP to place my text 'See All Announcements' to handle this scenario? Thanks in advance. Ravi      

Data Source View Gives incorrect Error--Different Data Type

Hi, I'm creating a report model (2008 R2).  I am trying to create a relationship between two tables.  One FKs to another--same name and type (tinyint) columns.  But the Data Source View editor doesn't allow this, giving the message "...source and destination column have different data types".  But the columns are the same types.  I ahd this once before  acouple of years ago and don't remember how I got around it. Does anyong have ideas?  

Data Source View

I followed this below procedure for create a DataSource View In Solution Explorer, right-click Data Source Views, and then click New Data Source View. On the Welcome to the Data Source View Wizard page, click Next. The Select a Data Source page appears. Under Relational data sources, the Adventure Works DW data source is selected. Click Next. On the Select Tables and Views page, you select tables and views from the list of objects that are available from the selected data source. You can filter this list to help you in selecting tables and views. ( My probelm comes in 4th step, I see my server name in Relational Data sources area, i click next to select Tables & Views but i dont see any list of tables in there..? What am i Missing? Today is my day one on SSAS...please HELP FM

How to get "Current Date" on SharePoint Designer for Invoice Ageing Data View Report??

Hi Experts, I would like to know how can i get/show "Current Date" in SharePoint Designer ?? Any good tutorial ? FYI, I need this "Current Date" for my Ageing Data View Report, Purpose To offset with "Invoice Receive Date" to get total days of payment payable for the invoice. Please assists, Thanks

Develop consumer which receiving data from list view

In my page I want to display a list view. Each time a user is clicking  on an item the relevant data of the current item will be passed to a consumer web part that I will develop. What interface the list view WP inherit from? Can you give send me an example of such implementation?   Tnx Keren  

Collapsed Grouping in Data View

I have created a data view that groups data to roll-up common items. The problem is that even though I have the data view group properties set to collapse by default, when the user opens the page, the contents are not collapsed by default.

Group by library name using Data View Web Part

I'm using a data view web part to disply documents in multiple libraries.  Is it possible to group on the name of the library instead of grouping on an individual column? Thanks
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend