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


Top 5 Contributors of the Month
satyapriyanayak
Kaviya Balasubramanian
SP
abhays
Sasi Prabhu
Post New Web Links

How to Bind ExpressionTextBox to my class object in ActivityDesigner?

Posted By:      Posted Date: October 19, 2010    Points: 0   Category :Windows Application
 

Hello,

I am just learning WF so this may be a easy question to answer.

I have a custom code activity, AddJobToQueue that takes as input arguments a MessageQueue and a JobTicket. JobTicket is my custom class from a separate library (added as a Reference).

In trying to create an custom activity designer for my activity, I have hit a snag. My activity designer uses two ExpressionTextBoxes for the two input arguments. I was able to get the binding correct for the MessageQueue, but I cannot determine how to get the binding for my custom class.

My current XAML is this:

<sap:ActivityDesigner x:Class="QueueActivityLibrary.AddJobToQueueDesigner"  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:s=
                                     
                                            
                                        

View Complete Post


More Related Resource Links

How to bind GridView and DropDownList controls using DataTable object

  
In .net framework 2.0, you can load a DataTable in memory by consuming a data source using a DataReader. In this version you will find the flexibility in accessing the DataReader means write access code once and use again and again using DataReader. To see the functionality of DataTable consider an example that is created using VS2005.

Building a Custom Data Grid: Performing Ad Hoc Web Reporting with a VBScript 5.0 Class Object

  

A flexible, customizable grid for displaying data is a useful tool for ASP developers. It allows Web visitors to customize their view of your data. This article takes the data grid presented in "Ad Hoc Web Reporting with ADO 2.0" by John Papa and Charles Caison (MIND, December 1998) and adds handy features such as a finds feature that supports multiple finds and a mode for adding and editing records. This version also improves response time by allowing asynchronous record download and it componentizes the code so it can be used as a standalone VBScript class object that can be reused in other pages.

Randall Kindig

MSDN Magazine July 2000


send data in class object from one page to another using session

  

hello everybody

now i hav stored all data like user name, data fatched from database of that user

and i stored that data and user name such as:

string strUserName="user name"

dataset ds =new dataset();// data of that user

now i wan yo send d whole data from my login page to user profile page

can anybody help me for that...................

and plz tell me that how much is this way is benifitial to send data from one page to another page

plz........kindly waiting for positive rply


MouseUp event not firing on ActivityDesigner class?

  
I have a custom control derived from ActivityDesigner.  I'm basically retemplating the contol to give it a stylized look and feel ... I want to add the ability to change the Display Name by swapping out the TextBlock with a TextBox on MouseUP - but this event is not firing. I can handle the MouseDown event and it works OK, except it enters the Edit mode when dragging the activity around.  Is the MouseUp handled at the base level?  Is there a way to work around this? 

Calling a method with a class object as parameter data type.

  
   [WebMethod]    public string GetInfo(Customer inCust)    {        // Code in here    } I have a web service that resides on a remote server. I want to call a public method of theweb service named  "GetInfo". The method is shown above. The web service method expects a class object oftype "Customer". What I did to create a Customer object was to define in my asp.net project my own class named "Customer" which is exactlythe same as the class that belongs to the web service project on the remote server. I then created an instance of Customerand tried to call the web service passing in an object of type customer : my.Service ws = new my.Service(); // Get web service connectionCustomer aCustomer = new Customer();aCustomer.Initialize();ws.GetInfo(aCustomer) // call web service passing in a Customer object The problem is that the compiler gives me the following error: Value of type '_Default.Customer' cannot be converted to 'ws.Class1'. Here Default is refering to my Default.aspx.cs code. Why is this? Do I need to Cast my "aCustomer" class object to a type ofws.Customer ? How do I do that?

Using extensions with Object Class and Page in WPF

  
I don't usually ask a question without trying it first, but hey, why not.  Searching for this one is not exactly easy. I am wondering if I can use extensions with Object and if they (the variables) will subsequently be available for use in a Page partial class generated for WPF?  By this I mean in the same project and assembly. BTW, I won't be offended by posts pointing out why not to do this with Object.  The why in this case is something as basic as having one base class that contain: bYes = True; bNo = False; Now of course, having a base class is not going to work with something like Page... There may be much better ways to this, what I do not want is syntax MyBaseInstance.bYes and MyBaseInstance.bNo in MyPageInstance and bYes or bNo everywhere else.  Any advice? Regards,  Dave Horsman

Unable to Create Object Variable for Linq Data Class

  

For some unknown reason I suddenly am unable to create an object variable for a Linq Data Class. If I create a new project and try the process again with the same database everything works as advertized.

The code I am using is Dim db As New RoggDataContext  which gives me an error on the object variable "db": Overload resolution failed because no accessibility 'NEW'  accepts this number of arguments.

I have looked inside every file in the Web Project like the web config to check the connection string, gobal, and designer.vb looking for any errors whit no JOY.  I also tried to create a new form and code behind with a button and received the same error.

This is mind blowing because as I already stated, I can create a new Web Site and the problem goes away.

Any help is appreciated!

 

Shawn




How to recognise obsolate object from isolated storage whose class has been changed?

  
<!-- [if gte mso 10]> <mce:style>

Hello,

Our company is building a word add-in (document-level add-in) with visual studio 2008, word 2007 and VSTO 3.0 sp1

There is one issue that causes us a headache. It is related to obsolete objects in isolated storage.

In Word add-in we serialize object and save it to isolated storage. Later we can load that object from isolated storage and use it in our application.

The problem occurs in following scenario:

-We are working in Word add-in and save one serialized object to isolated storage

-Turn of Word add-in and change code of the class whose instance we have saved in isolated storage

-Work in word add-in again and load and deserialize object from isolated storage. This object is of obsolete class and code usually breaks here or later in code when we are trying to access changed content.

If this scenario happens, we will clear obsolete object from isolated storage. Issue is how to recognize that object’s class is changed?

We tried to recognize changes in the following ways:

·       &

how to create class and acess member using object

  
hi i am a new user to C# .net can any body help me to write a new class in c# AND HOW TO ACESS methods and members using its object thnks in advance

how to bind object data source with bullited list

  

 i wanted to retrieve things from the data base and perform mathmatical operations on it then post it to the user, so i was told to use the bullited list and bind it to the object dataSource

how to perform such thing??


How to update value directly in class Object using Linq

  

Hi,

I have a class object which is basically kind of hierarchy and looks like this when I convert that to XML.

===================================================================================

<ObjectComponent>
  	<SKU>SKU 1</SKU> 
	<IsBundle>true</IsBundle> 
	<Quantity>4</Quantity> 
	<ConfigurationStatus>Not Configurable</ConfigurationStatus> 
	<ObjectBundle>
		<ObjectComponent>
  			<SKU>SKU 2</SKU> 
  			<IsBundle>true</IsBundle> 
  			<Quantity>4</Quantity> 
  			<ConfigurationStatus>Not Configurable</ConfigurationStatus> 
			<ObjectBundle>
				<ObjectComponent>
  					<SKU>SKU 3</SKU> 
		  			<IsBundle>true</IsBundle> 
  					<Quantity>4</Quantity> 
		  			<ConfigurationStatus>Not Configurable</ConfigurationStatus> 
  				</ObjectComponent>
			</ObjectBundle>
  		</ObjectComponent>
	</ObjectBundle>
</ObjectComponent>


 

===================================================================================

So you can see that I have "objectComponent" which is kind of hierarchy and that hierarchy can be upto any level.

Now I need to update <quantity> value where <sk

how to persist a class object when page PostBack

  


Hi,
i have created a user control UserControl.ascx, in Code behind file of UserControl.ascx i have created an object of a class MyClass.cs,
Like
if(!Page.IsPostback) {
objMyClass= new MyClass();
}
but when i click on button of UserControl.ascx page and try to access objMyClass object then it set as null, so how to persist MyClass object when page PostBack, i wanted to keep object persist till the user access the page, when user goes out of this page then object should distroy?

To keep the object persist, i have used ViewState

So i have made MyClass Serializable and
i have used ViewState to keep my objet persist, but it give the error
like : UserControl is not marked as serializable.

so i have made my UserControl as Serializable, but the problem is still coming.

One more thing is that MyClass is also resposnsible to create some other class object also.

Can any one suggest me correct solution?

Problem i am getting when i try to PersisObject On UserControl

[SerializationException: Type 'ASP.common_grid_UserControl_ascx' in Assembly 'App_Web_44142fbl, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' is not marked as serializable.] System.Runtime.Serialization.FormatterServices.InternalGetSeri

Unable to bind a List of a [DataContract] class to a ListBox

  

Hello,

 

I have a class who is used by Silverlight though RIA Services and who contains the [DataContract] and on its properties [DataMember].

That class is also used by my WPF Application and i have a List<myClass> which i want to bind it on ListBox.

 

The problem is when i bind the list, when i select an item in my listbox, the first item is always selected and the right-click doesn't work properly.

In fact, the behavior of UI is weird and badly refreshed.

But, before, the class didn't have DataContract/DataMember attributes and it worked fine.

 

Do you know, a workaround to continue to use that class and avoid to create an other class specially for databind ?

 

 

Regards,

Guillaume.


Interface object Versus Class Object

  

Asslam o Alaikum

namespace Interface
{
    interface IMyInterface
    {
        void Start();    
        void Stop();
    }

    class Program : IMyInterface
    {
        void IMyInterface.Start()
        {
            Console.WriteLine("\n Void Start Method Implement");
        }
        void IMyInterface.Stop()
        {
            Console.WriteLine("\n Void Stop Method Implement");
        }
        
        static void Main(string[] args)
        {
            IMyInterface iMyInterface = new Program();
            iMyInterface.Start();
            iMyInterface.Stop();
        }
    }
}


1. IMyInterface iMyInterface = new IMyInterface(); // if i create the object of interface i get Error
2. Program iMyInterface = new Program(); // if i create the object of program i can't get the property of Interfaces i.e. Start(); stop();
3. IMyInterface iMyInterface = new Program(); // This will work fine

i want know the difference about 3 points can any body claer it ..

Thanks


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