Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / Silverlight > Navigation > Passing values from .aspx.cs page to .xaml.cs page residing in different project.

Not answered Passing values from .aspx.cs page to .xaml.cs page residing in different project.

Feed from this thread
  • Abhishek Chauhan avatar

    Posted on Sep 30, 2009 (permalink)

    Hi,

    I need to pass the value of a variable from a .aspx.cs page in one project to .xaml.cs page in another project (No navigation required). Just to mention the two projects are part of a solution that has an n-tier architecture.

    If anyone has already done that, please suggest me the solution.

    Thanks in Advance,
    Abhishek Chauhan

    Reply

  • Valentin.Stoychev Valentin.Stoychev admin's avatar

    Posted on Oct 1, 2009 (permalink)

    Hi Abhishek Chauhan,

    Please check this blog post:
    http://www.dotnetspider.com/Silverlight-Tutorial-313.aspx

    All the best,
    Valentin.Stoychev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.

    Reply

  • Abhishek Chauhan avatar

    Posted on Oct 2, 2009 (permalink)

    Hi Valentin,

    Thanx for the quick reply. Can you please tell me if it is possible to pass the values from a C# class library to the silverlight page (in another project) as well.
    Actually i am calling a stored procedure that has an output parametrs in my data access layer (.cs file) as shown below-

    public

     

    DataSet GetWorkflowDetails(string userName,string selectedStage)

     

    {

     

    DataSet dtWorkflowDetails = new DataSet();

     

     

    SqlParameter[] spParamaters = new SqlParameter[2];

     

    spParamaters[0] =

    new SqlParameter("@USERNAME",userName);

     

    spParamaters[1] =

    new SqlParameter("@SELECTED_WORKFLOW_STAGE", SqlDbType.VarChar, 50, selectedStage);

     

    spParamaters[1].Direction =

    ParameterDirection.Output;

     

     

     

    using (DataAccess dataAccess = new DataAccess())

     

    {

    dtWorkflowDetails = dataAccess.DataSetFromStoredProcedure(

    "SP_InboxWorkflowStatus", spParamaters);

     

    selectedStage = spParamaters[1].Value.ToString();

     

     

    //CommonMethods.WriteToLogFile(checkStage, string.Empty);

     

    }

     

    return dtWorkflowDetails;

     

    }

    The web service that I call in the .xaml.cs file, simply returns the Business logic method that calls the above mentioned method in DA layer.
    Now the problem is that I need to pass the "selectedStage" variable (having the output parameter value) to the Silverlight application that resides in a different project.

    Please help me if you have any idea how to achieve this.

    Thanks in Advance,
    Abhishek Chauhan

    Now

    Reply

  • Valentin.Stoychev Valentin.Stoychev admin's avatar

    Posted on Oct 8, 2009 (permalink)

    Hi Abhishek Chauhan,

    You can't pass it directly from the code behind. You need to pass it to the client side fist and then with javascript to pass it to Silverlight.

    Let us know how it goes.

    Best wishes,
    Valentin.Stoychev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / Silverlight > Navigation > Passing values from .aspx.cs page to .xaml.cs page residing in different project.
Related resources for "Passing values from .aspx.cs page to .xaml.cs page residing in different project."

Silverlight Navigation Features  |  Documentation  |  Demos  |  Telerik TV  |  Self-Paced Trainer  ]