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


Top 5 Contributors of the Month
Sharon Maxwell
Post New Web Links

WCF Property not visible to Client

Posted By:      Posted Date: September 13, 2010    Points: 0   Category :WCF
 
I am currently developing a WCF service .net 4.0 which has got 2 properties. For some reason those property is not visible on the client. Following is the code for the service. <pre> using System; using System.Collections.Generic; using System.Linq; using System.Runtime.Serialization; using System.ServiceModel; using System.ServiceModel.Web; using System.Text; using System.Data; using System.IO; using System.Configuration; using Longview.ScatIt.Data.Model; using Longview.ScatIt.Service.Contract; namespace Longview.ScatIt.Service {  // NOTE: You can use the "Rename" command on the "Refactor" menu to change the class name "SqlJob" in code, svc and config file together.  [ServiceContract]  public class SqlJob : ISqlJob<SqlJobInformation>  {      #region IJob Members         [DataMemberAttribute(Name="FileName")]         internal string _fileName;         [DataMemberAttribute(Name = "Location")]         internal string _location;   #endregion  } } </pre> I read somewhere on internet that in partial trust property need to be defined as "internal" and add [assembly: InternalsVisibleTo("System.Runtime.Serializat


View Complete Post


More Related Resource Links

visible property of Tab pages in Tabcontrol

  
i am using VB 2008. i have an applicaiton with a TABCONTROL with 3 pages. Each page has a few other controls and two buttons. the 2 buttons are ENABLE and DISABLE. now what I need is that.... if i click on DISABLE button on TabPage1 then the TabPage2 and TabPage3 should be disabled (not selectable). it will be ENABLED only after clicking on the ENABLE button. the same should happen with the other pages also. the problem i am having is that i cannot find the ENABLE or the VISIBLE property of the TabPages. also i want this to be done programmatically. quick help please. any workaround for this issue. and code.... thanks to all.  

Windows Workflow : Activity Binding Properties Window Ellipses button not visible for one property

  
I have created a custom activity, when I am using this activity in workflow designer I am not getting the ellipsis button to select a property.  I am getting the ellipses button for first property LongValue while not getting the option for "NavigationUrl" property. This is the code for my custom activity. public partial class SetLongAsResult: Activity {         public SetLongAsResult() { InitializeComponent(); }         public static DependencyProperty LongValueProperty = DependencyProperty.Register("LongValue", typeof(long), typeof(SetLongAsResult));           public static DependencyProperty NavigationUrlProperty = DependencyProperty.Register("NavigationUrl", typeof(string), typeof(SetLongAsResult));           [Description("long value to be returned")]         [Category("Set Result Data")]         [BrowsableAttribute(true)]         [DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Visible)]         public long LongValue         {             get             {         

javascript pageLoad() & client side isPostBack property?

  
Hello and thanks for your help in advance. I have some javascript code that I have placed in the pageLoad() function like this:function pageLoad() { var x = 5; }But I only want this to happen on the first time the page loads... Is there an isPostBack property on the client site?

Data Annotation not triggering the client side validation when used on an overriden model property

  
Hi all, This is a saga from a post that was recently answered:http://forums.asp.net/t/1598187.aspxMy main problem is the lack of client side validation when we use a child model class, the server side validation works like a charm whether you use the virtual/override solution or the new attribute on the child class with the getter and setter linking the property to the base class's one.The client side validation does not work with none of the solutions presented below.This is a sample code of the first solution: [Serializable] public class DateViewModel { ... [Display(typeof(App_GlobalResources.Messages), "Date_Year")] public virtual int? Year { get; set; } ... } [Serializable] public class BirthDateViewModel : DateViewModel { ... [Display(typeof(App_GlobalResources.Messages), "Date_Year")] [YearRange(ErrorMessageResourceType = typeof(App_GlobalResources.Messages), ErrorMessageResourceName = "Validation_Range")] public override int? Year { get; set; } ... } This is a code sample of the second solution : [Serializable] public class DateViewModel { ... [Display(typeof(App_GlobalResources.Messages), "Date_Year")] public int? Year { get; set; } ... } [Serializable] public class BirthDateViewModel : DateViewMod

ListView Table's Visible Property

  
hello: I have a <table> inside the ListView. I want to hide and show one of the columns in the ListView, depending on a Hidden Field Value. <asp:ListView ID="lvOrder" runat="server" OnItemDataBound="lvOnItemDataBound" DataSource='<%# Eval("Values") %>'> <LayoutTemplate> <table id="Table1" runat="server" border="0" cellpadding="1" cellspacing="1"> <tr id="itemPlaceHolder" runat="server"> </tr> </table> </LayoutTemplate> <ItemTemplate> <tr id="Tr2" runat="server" class="lvOrderRow"> <td class="tdOrderForm1"> <asp:Label ID='lblIM_CustomerItemNumber' Text='<%# Eval("CustomerNumber")%>' runat="server"> </asp:Label> </td> <td visible="<%# gohere() %>" class="tdOrderForm8"> <asp:Label ID='lblIM_Attribute' Text='<%# Eval("IM_Attribute")%>' AssociatedControlID="lblAttribute" runat="server"> </asp:Label> <div ID="lblAttribute" runat="server" ></div> </td> </ItemTemplate> </asp:ListView><asp:HiddenF

Property no visible in XAML

  
Hi I am using the GroupBar control in WPF. I can access the SelectedItem Property from the CodeBehind in the WPF. But in XAML SelectedItem property is not visible for an access. I need to get the selected Groupbar value from the View to ViewModel through the Binding. How can i achieve this ? Thanks, Velu

Accessing an Array of Strings Property from WCF Client

  

First let me apologize for the elementary question, but I’m not a developer by trade and only have to put that hat on when needed for work.  However, I’ve written a WCF service that contains an array of strings as a DataMember .

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;
using System.Runtime.Serialization;

namespace OBCreateEForm
{
  [DataContract]
  public class EForm
  {
    [DataMember(IsRequired=true, Name="EFormDocTypeName", Order=0)]
    public string EFormDocTypeName { get; set; }

    [DataMem

Client Side Validation - suppressing specific property errors

  

Hi there,

I have implemented some Client Side Validation in MVC via <%Html.EnableClientValidation(); %> I am using Metadata Descriptions an EF and it's working fine but one thing is driving me crazy!!

I have a Price field that is a number (double) and I have some metadata errors for it for range and required but MVC is adding in this validation "The field Price must be a number." which would be fine except!! when I type 20.     (note the decimal point) this validation fails with a popup "The field Price must be a number." then when I type another number e.g. 20.0 it goes away again.

Is there some way to ignore/suppress non custom property validation errors??

Cheers

Rob


Use jQuery and ASP.NET AJAX to build a client side Repeater

  
By sending only data to the client, you can profoundly reduce the size of what you send and see a substantial increase in performance. You also allow yourself the ability to easily add features like light-weight sorting and paging on the client. This can not only improve your users' experience, but reduce server load and bandwidth requirements.

Client Side Gridview Pagination using JQuery

  
I would like to show how to use Client Side Gridview Pagination using Jquery Table Pagination Plugin by using Ryan Zielke.

Use jQuery and ASP.NET AJAX to build a client side Repeater

  
By sending only data to the client, you can profoundly reduce the size of what you send and see a substantial increase in performance. You also allow yourself the ability to easily add features like light-weight sorting and paging on the client. This can not only improve your users' experience, but reduce server load and bandwidth requirements.

To that end, I'm going to walk you through these four steps to effectively implementing a client side Repeater, using ASP.NET AJAX and jQuery:

Practical Multithreading for Client Apps

  
Writing applications that use multiple threads is often considered an advanced programming task, prone to errors. In this month's column, I'll focus on a practical application of multithreading in Windows® Forms applications with some real benefits, while attempting to keep things simple. My goal is to present multithreading in an approachable way that addresses a very common need: writing applications with a user interface that remain responsive to the user.

Use jQuery and ASP.NET AJAX to build a client side Repeater

  
By sending only data to the client, you can profoundly reduce the size of what you send and see a substantial increase in performance. You also allow yourself the ability to easily add features like light-weight sorting and paging on the client. This can not only improve your users' experience, but reduce server load and bandwidth requirements.

WPF / Silverlight tutorial: Visibility property and binding

  
Visibility property is a very powerful and yet often overlooked property available in both WPF and Silverlight. It enables you to set Visibility of certain UIElement objects to different states like: Visible, Collapsed and Hidden (not supported by Silverlight). This tutorial shows you how to use it and how to bind to Visibility property

Adding Client-Side Confirmation When Deleting

  
The JavaScript confirm(string) function displays its string input parameter as the text inside a modal dialog box that comes equipped with two buttons - OK and Cancel (see Figure 1). The confirm(string) function returns a Boolean value depending on what button is clicked (true, if the user clicks OK, and false if they click Cancel).

abstract away the source of the connection string using a class with a static property.

  
ASP.NET provides a configuration system we can use to keep our applications flexible at runtime. In this article we will examine some tips and best practices for using the configuration system for the best results.

The element of a web.config file is a place to store connection strings, server names, file paths, and other miscellaneous settings needed by an application to perform work. The items inside appSettings are items that need to be configurable depending upon the environment, for instance, any database connection strings will change as you move your application from a testing and staging server into production.

Encapsulation
Let's abstract away the source of the connection string using a class with a static property.
Categories: 
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