English 中文(简体)
出入证 银灯应用服务器数据库
原标题:Accessing SQL Server database from silverlight application

我们的协会。 互联网网站允许用户根据数据库查询的结果,进行各种查询并展示网络图(如UML图表)。 目前,我们正在绘制一份比图并展示。 但是,由于我们需要支持一个特点,使用户能够以互动方式展示/展示某些区块,我们计划利用银星提供图像。 我们还计划在今后增加更多的互动。

我有两个问题:

  1. Is it possible to an ASP.NET application to send parameters to silverlight application.
  2. Is it possible for a silverlight application to query a SQL server database.

PS。 如果还有其他比银灯更好的替代品,请说明。

最佳回答

你们应当使用适当的结构,而实际上,你不能提及任何不属于SL控制的图书馆。

一旦有了你的DAL和你的BL层,你就能够按照需要,把BL的部分逻辑与WCF的服务层联系起来,并从SL的申请中加以利用。 参看我所建议的分层办法,这种办法不仅与多国公司合作,而且如果你实际上不使用欧洲法郎,也适用。

MVC3和实体框架

问题回答
  1. Yes, by using query string parameters in your aspx markup where you define your object tag.
  2. No, at least not directly. You can connect your silverlight application to a WCF application that can query your database.

Simply put: 1 yes, 2 directly: no

不仅如此简单地说:

:

你们可以使用斜线通过多个(直线)参数。


http://www.un.org。 If you put the following in your object code on your aspx page:

<param name="InitParams" value="keyOne=valueOne, keyTwo=valueTwo" />

在你的申请中,请在施工人员中添加以下内容:

this.Startup += this.Application_Startup;

之后,你可以去除阴道的假肢。

private void Application_Startup(object sender, StartupEventArgs e)
{
    foreach (var data in e.InitParams)
    {
        if(data.Key.Equals("keyOne"))
        {
            //data.Value now equals valueOne
        }
    }
}

2: You can use a WCF service to communicate with a server and send and receive data (for example database data)


http://www.un.org。

http://msdn.microsoft.com/en-us/library/bb332338.aspx”rel=“nofollow” NET方案。






相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Transaction handling with TransactionScope

I am implementing Transaction using TransactionScope with the help this MSDN article http://msdn.microsoft.com/en-us/library/system.transactions.transactionscope.aspx I just want to confirm that is ...

System.Web.Mvc.Controller Initialize

i have the following base controller... public class BaseController : Controller { protected override void Initialize(System.Web.Routing.RequestContext requestContext) { if (...

Microsoft.Contracts namespace

For what it is necessary Microsoft.Contracts namespace in asp.net? I mean, in what cases I could write using Microsoft.Contracts;?

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签