.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

SelectMethod property missing from DomainDataSource class

Posted By:      Posted Date: August 30, 2010    Points: 0   Category :WCF
I have an issue using WCF RIA with ASP.NET. I can't find the SelectMethod property of the Microsoft.Web.UI.WebControls.DomainDataSource class. What happened to this property? Am I using the wrong class?  I'm using VS2010 with the latest versions of Silverlight 4 Tools and RIA Services Toolkit installed. Any help with this would be greatly appreciated. Cheers, Simon

View Complete Post

More Related Resource Links

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.

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

how to get the value of a class property using reflection?

i have a class like this..public class MyClass{List<ValueObjectClass> SampleList {get; set;}...}how can i get the value of MyClass.SampleList using reflection and convert it to List<T>?thanks..

Error on VS 2008 Class Library project: are you missing an assembly reference?)

http://msdn.microsoft.com/en-us/library/bb153523(office.12).aspx Working with ASP.NET 2.0 Web Parts and Windows SharePoint Services 3.0 Based on the above MSDN Walkthrough, I created a Class Library VS 2008 project. When clicking the Build menu, 11 errors on System.Web.Security etc popped up.  What's wrong? *********************************************** using   System; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; Error 1 The type or namespace name 'Security' does not exist in the namespace 'System.Web' (are you missing an assembly reference?) Error 2 The type or namespace name 'UI' does not exist in the namespace 'System.Web' (are you missing an assembly reference?)

Class Property, using Set


My class uses a dataset and a property to "get" and "set" the rows in a SQL table called GROUPS into a class table called tblGroups.  In my constructor I select the contents of the GROUPS datatable and use the "Set" code in the property to populate tblGroups as follows"

Here is the property in the class:

    Private tblGroups As DataTable = New DataTable

    Public Property Groups() As DataTable
            Groups = tblGroups
        End Get
        Set(ByVal value As DataTable)
            tblGroups = value
        End Set
    End Property


Constructor Code:

Groups = ds.Tables("Groups")



When instantiating a new class object the set code above does a fine job of loading any existing records into my tblGroups table.  Now I wish to add additional records into that table.  What is the best way to accomplish this?

  • Do I need to create a seperate method to handle this, or should I change the existing "set" code somehow?
  • If the answer is to change the "set" code, can I add additional byVal variables?
  • If so, then how do I accomplish that without c

how to change button backcolor property on a form from a class file


Hello friends,

I am having a problem of updating the main form button backcolor property from another class. I have attahced the code. Please tell how can i rectify this problem.

PopUp is another class, in which i want that when ToolStripDropDown closes it change the form button BackColor from Orange to WhiteSmoke.


public partial class PopUp : ToolStripDropDown


        public PopUp()





        protected override void OnClosed(ToolStripDropDownClosedEventArgs e)


               Form1 f1 = new Form1();

              // f1._pushed = false;

       f1.Controls["button1"].BackColor = Color.WhiteSmoke;





It seems that this line works, i checked it using MessageBox it changes the backcolor property but it does not updated to the form displayed on the screen. 

Can anyone help me

class contains non-dependency-property data members that are DependencyObject objects, you must also


I was reading the article Freezable Objects Overviewand came acrosee the statement

"If  your class contains non-dependency-property data members that are DependencyObject objects, you must also call the OnFreezablePropertyChanged method each time you change on of their values, even if you're setting the member to null. "

I quite do not understand the part about non-dependency-property data members that are DependencyObject objects. Can some one explain exactly what this means? If a data member is derived from the DependencyObject  class how then can the data member be a non dependency property?

I am also trying to locate some source code / project that overrides the OnFreezablePropertyChanged method, and have yet to find any on the interenet.

If anyone know whe

2010 Collection class syntax/property problem

I converted a project from 2008 to 2010 to be able to use the TPL.

I've updated the compile target to .NET 4. Everything seems good, including the .NET 4 specific TPL stuff...except that:

Parallel.ForEach(MyClassCollection.Cast(Of MyClass), (Sub(ANYTHING As MYClass) ANYTHING.MySubRoutine()))

Gives the following as a syntax error:

Error 2 'Cast' is not a member of 'Microsoft.VisualBasic.Collection'. C:\Users\jeff\Documents\Visual Studio 2010\Projects\MyProject\MyProject\RunLoop.vb 229 34 MyProject

Any ideas?


How to get child property inside parent class, with lambda?


Hi all,

Could you answer me how to do next, please? How to do this with Lambda? Is it possible to delegate some object instance and use its properties and methods in case if this method doesn't know type of delegated object?

class class_a {
    public string getChildData<T> (T dynamicInstance) {
        return dynamicInstance.prop;

class class_b : a {
    public string prop = "prop_b";

class class_c : a {
    public string prop = "prop_c";

var inst_b = new b ();
var inst_c = new c ();

Purpose : to get child property inside parent class?

Thanks, Artem

Problem retrieving bit colum with sqldatareader for vb class property


 I have a vb class that reads a single row of data from an SQL view. I want to add a property to it that will expose the value of a new bit field. But whatever I do my class always returns the value "false".

What am I doing wrong?

       Public ReadOnly Property IsPublished() As Boolean
                Return valPublished
            End Get
        End Property

Here's the relevant line from my datareader:
        Me.valPublished = Convert.ToBoolean(theObjectReader("Authorised"))Authorised is my bit field. I have tried it with and without the "ConvertToBoolean" statement.
When I response write the value of the property for rows where this field is true, it always shows false.

Any ideas?

Add User Profile Property -- missing AD attribute


I am trying to add a user profile property, when I tried to map this field to a AD attribute, I realized not all the attributes are exposed. Is there anything I might be missing in SP, or something I have to setup in AD?

Please advice, your help would be greatly appreciated.

How to set a style's TargetType property in XAML to a Generic Class?


I've just moved to .NET 4.0 / Visual Studio 2010 and am hoping there is a new answer to this question, found on StackOverflow from over a year ago:

Is it possible to set a style's TargetType property in XAML to a Generic Class?

public class Selector<T> : Control { }

and then in xaml

<Style x:TargetType="Selector">
<Setter Property="MyProperty" Value="Green" />

I found this on the WPF Tutorial, and would like to find a similar mechanism for this situation above.

<!-- XAML 2009 -->
<ObservableCollection x:TypeArguments="Employee">
 <l:Employee FirstName="John" Name="Doe" />
 <l:Employee FirstName="Tim" Name="Smith" />
</ObservableCollection />



SiteURL Property Exists but deployment still reports - Definition is missing 'SiteUrl' property an


I am having trouble deploying a new BDCModel to the BCS, the WSP is package and will deploy succesfully using the stsadm command.  However in the trace logs the following error occurs

"definition is missing 'SiteUrl' property and it cannot be determined"

The site url property exists within the Feature.Template.xml with in VS2010 and I can confirm the server also has this property in the Templates\Features\FeatureName\Feature.xml


This is a muliptle server farm, I have tried deploying directly from VS2010 and then deploying from within Central Admin - Solution Management instead of STSADM and the same error occurs.


Any suggestion would be greatly appreciated.


lifespan of a property inside a static class in IIS



I want to know , how good / bad is it to save configuration values in a static properties?

I am creating an application which reads configuration from an XML file and a DataContext file, instead of sending the CustomConfig class into the configuration.xml each time I tought about using an ReadXml() method on application_start at the global.ascx

the ReadXml() method would save the data in static properties of CustomConfig and whereever I would want to read that particler data I would ask CustomConfig.PROERTY_NAME

My question is ? how smart it is ? how long does IIS would save the data in a static member? (if as long as the application exists then I'm ok as long as I add the ReadXml() in the application_start)

would like to hear your comment.. 

Using a List(of T) as a "Property" in a class


In my application I have a class called "RCategory" as illustrated here:

Public Class RCategory
    Public Property RCatNum As Integer
    Public Property RAct As Char
    Public Property RMin As Double
    Public Property RMax As Double
    Public Property RTyp As Char 
End Class

I have another class where I want to use a List (of RCategory) as a property, to-wit:

    Public Property RpStrt As Date
    Public Property RpEnd As Date 'Plan Year End
    Public Property RCat As List(Of RCategory)
    Public Property MinFee As Double


I'm trying to add to my list using the following code:

                        For ct As Integer = 1 To 8
                            Dim c As New RCategory With {.RCatNum = ct,
                                                         .RAct = dr("RACT" & ct.ToString).ToString,
                                                         .RTyp = dr("RTYP" & ct.ToString).ToString,
                                                         .RMax = CDbl(dr("RMAX" & ct.ToString))}
                            If ct = 4 Or ct = 5 Then
                                c.RMin = CDbl(dr("RMIN" & ct.ToString))

Inserting Property values of class into ParamArray parameters as object()


Hi All,

Using the properties as defined in a class, how about can I put them into the ParamArray parameters argument of my function.

The code as follows:

Public Class MyObject

   Public Property Prop1 as string

   Public Property Prop2 as integer

   Public Property Prop3 as Boolean

   Public Sub  AddNewMyObject

        MsSQL_ExecuteNonQuery("StoredProc_AddNewMyObject", ________________?)

   End Sub

End Class

Protected Function MsSQL_ExecuteNonQuery(ByVal storedProc as string, ByVal ParamArray parameters as object())

'Some Code here.

End Function

Please kindly help and advice.

Thank you in advance.

Warmest Regards,


.asmx/js missing custom class properties


I have a web method that accepts a class of type Person and simply returns back the same person. I am trying to call this method from an AJAX client. The issue is that the properties of my Person class do not seem to be rendering within the client proxy Person class that is created when accessing MyWebService.asmx/js. Can anyone see what is wrong here?


using System;
using System.Runtime.Serialization;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services;

namespace WebApplication2
public class Person
public Person(){}

public string Name { get; set; }

/// <summary>
/// Summary description for WebService1
/// </summary>
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
public class WebService1 : System.Web.Services.WebService
public Person EchoPerson(Person person)
return person;


WMI class Win32_PerfRawData_PerfProc_Process property PercentProcessorTime in physical and virtual m


Any insights on this would be greatly appreciated...

I am using Win32_PerfRawData_PerfProc_Process to query 'PercentProcessorTime', i.e., '% Processor Time' and cook it using the formula 100*((X1-X0)/(Y1-Y0)) to get the CPU utilization of a process (not the processor).

The experiment is conducted in a physical workstation and on a Virtual Machine. The outcome is really interesting. While it takes 0.005% on the physical workstation takes about 7% in the virtual machine...

Any idea on why this happens would be very helpful. Also would be interested to know the best way to collect CPU utilization of a process that runs in a virtual machine (guest OS).

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