如何使用C#将SQLserver数据绑定到SharePoint 2013母版页 [英] How to bind SQLserver data to SharePoint 2013 Master page using C#

查看:98
本文介绍了如何使用C#将SQLserver数据绑定到SharePoint 2013母版页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨 
$


我有一个C#解决方案,我已经导入了自定义西雅图母版页。对于顶部功能区中的该页面,我必须动态绑定来自MS SQL服务器数据的数据。每当用户点击顶部功能区上的URL时,数据应该从SQL Server表绑定。我需要
来为我的解决方案中的现有主模板创建类。有人可以帮助我。请让我知道如何实现这一点。



邮寄给我nagarajan.x.elumalai@gmail.com



Nagarajan 9841766690

Hi 

I have an C# Solution where i already imported custom seattle master page. For that page in top ribbon i have to dynamically bind data from MS SQL server data. Whenever user clicks on the URL on top ribbon data should be bind from SQL server table. Do i need to create class for the existing master template in my solution. Can someone assist me. Please let me know how can i achieve this.

mail me nagarajan.x.elumalai@gmail.com


Nagarajan 9841766690

推荐答案

您好,

我们可以创建一个代理控制并使用代理控制到母版页以满足您的要求。

We can create a Delegate Control and using the Delegate Control into master page to achieve your requirement.

以下文章供您参考:

在SharePoint中使用代理控制

https://www.codeproject.com / Articles / 569897 / Using-Delegate-Control-in-Sharepoint

在SharePoint中创建代理控件

https://www.c-sharpcorner.com/UploadFile/82b15a / creating-delegate-controls-in-sharepoint /

或者我们也可以创建一个自定义REST服务来从SQL Server表中获取数据然后使用jQuery Ajax从主页面中使用其余服务。

Or we can also create a custom REST service to get data from SQL Server table, then consume the rest service from the master page using jQuery Ajax.

或者我们可以在SharePoint中创建外部列表以绑定来自SQL Server数据的数据,使用OOTB使用外部列表休息api。

Or we can create an external list in SharePoint to bind data from SQL server data, the use the external list using the OOTB rest api.

最好的问候,

Dennis


这篇关于如何使用C#将SQLserver数据绑定到SharePoint 2013母版页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆