Display External Data in Kentico - c#

I'm using Kentico CMS 7 and there is a way to import external data from Database
http://devnet.kentico.com/docs/devguide/index.html?displaying_data_from_external_database.htm
Displaying data from an external database kentico need to be included in visual studio
so i can customize it
but there is something missing in this article of how to include webproject.sln with some pages already made in kentico based on virtual paths like (Home.aspx - Conatct.aspx - About.aspx) ??

If you mean import the data, then I suggest to use Kentico Import Toolkit.
If you just want to display data from external database, then it depends on what your development model in Kentico CMS is.
Portal engine mode - mentioning the virtual paths for pages like Home.aspx suggests that you use portal engine development. In that case you don't need to write your own code. Use the SQL data source webpart with combination of a viewer webpart like repeater. You can also develop your own webpart to do what you want, see the documentation of how to create a webpart.
ASPX development mode - this mode allows you to leverage your existing knowledge of ASP.NET and write standard code in similar way how it is described in the article.
In situation you would truly need to edit portal engine templates in Visual Studio you need to deploy it from DB to file system. See this article.

Related

DNN module development with Razor and C#

I want to add a Razor module to my CMS which was created by DNN. In that razor module I need to show data from database. What would be the best way to do it.
Need a help
Thank you,
Nayanajith
Add an instance of the Razor Host module to a page, and start from there. If you look at the Wiki on dnnsoftware.com, you'll find some more stuff.
For more than complicated uses, that a look at the 2sxc module free at sexycontent.codeplex.com.
If you are planning to get data from the DNN database, you'll want to learn about the DNN api.
I found a simple solution to my problem.
I created a Empty ASP.NET project in visual studio.
Then added Razor page in to that particular project (remember to
delete configuration file).
Then I use connection string and created normal database access class
and added functions which I needed.
Then published the ASP.net Web application and put it in to the DNN
DesktopModule/RazorModule folder and created the module from the DNN
admin.
Now it works fine :)

Creating SharePoint-linked forms in WPF

Can anyone point me in the direction of some potted WPF controls for interacting with SharePoint fields? Ideally, they should have comparable functionality to the HTML fields defined in the SharePoint XML namespace used in SharePoint designer. An ideal scenario would be to include similar syntax to the server-side defined HTML elements referencing a field in a list, and let the control decide what sort of data it needs to represent, and whether it needs to be editable or not.
In particular, I need it to support:
A people finder field that allows people to be identified from their names, email addresses, or usernames, much like the default HTML form element.
A formatted text field that provides basic formatting tools in the ribbon, as well as being able to provide the formatted text back as HTML (because this is how it seems to get stored in SharePoint).
Text boxes (single/multiline), combo boxes, and radio buttons (but these are all relatively easy, because they already exist as WPF controls)
In addition, values need to available in a way that allows me to push them back to the server and expect items to update. This is most important for formatted text and user "people" fields, since their displayed value is often quite different from the actual value (e.g. includes indexes to the UID for the user, or includes HTML respectively).
At present, following a lack of responses to a similar question on SharePoint StackExchange, I'm hosting the existing SharePoint forms in a WebBrowser control, which is, fairly obviously a pretty sub-optimal solution (mostly for UX and stability reasons); worst case, I can inject some CSS into the pages being displayed to hide them, but I'd really rather be abel to build something that's relatively robust.
SharePoint 2010 has provided both the Server Object and Client Object model using which a developer can use a client interface like WinForm or WPF and interact with SharePoint 2010 Web Applications, as well as work with SharePoint Objects. SharePoint 2010 has also provided Web Services and WCF services using which any client UI application can interact with it.
To use client object model, SharePoint 2010 has provided the following assembly references:
Microsoft.SharePoint.Client.dll
Microsoft.SharePoint.Client.Runtime.dll
You can find these references from the following path:
C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\ISAPI
And for 2013:
C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\ISAPI
Sources:
http://www.dotnetcurry.com/showarticle.aspx?ID=761
http://www.dotnetcurry.com/showarticle.aspx?ID=758
This said, have you considered to do this using the content editor web part and JavaScript / jQuery and incorporate the app into the SharePoint stack?
Here is a similar question answered
Hope this helps!

How to Download Document from Sharepoint Librarly and display in ASP.NET programatically?

I have created a document library with name "ARTICLES" in SHAREPOINT which stores documents. Now, I want to display the documents in Repeater and clicking on row it must display the document. And also all documents must be Downloaded in Application folder.
The application is pure asp.net application using c# and not a webpart or other.
Help appreciated!
thanks!
Although it might not suit your application (and it isn't exactly what you asked for), there is a much easier way of achieving what you described (suited for intranet applications where Windows Authentication is used).
It involves two parts:
In your web application add a IFRAME that points to your SharePoint library (using the default SharePoint web interface).
[optional] Add a custom master page to this library so that you can hide menus etc.
For many applications this solution is sufficient and saves you lot of trouble of coding the integration (and retesting it with every SharePoint update) decoupling your application from SharePoint. It also makes sure that the end user can use all SharePoint functionality such as uploading the changes directly from Word etc.

Content Editor for Client

I've created a website for a client of mine. It is coded in ASP.NET with C# and hosted on GoDaddy. She requires this website to updated daily by her. However, this client has very little knowledge of how to edit HTML or text within a site. I don't want to edit it every time she wants an update on the site.
What would be the best solution to my problem? I have looked up Content Management Systems, but I'm a little confused by what exactly it does in terms of coding and the management of the existing site. Does it require me to reformat the whole site to follow the CMS's 'templates'? Would it be better for me design my own back-end panel for her to edit the content (this would obviously take significant work)?
If you want to stick with a site you're developing from scratch, I'd use the HtmlEditor from the AjaxControlToolkit or a similar control, and store the html content in the database.
Then, when outputting the html from the database to the client pages, I'd make sure to use the Microsoft Anti-Cross Site Scripting Library to sanitize the html using the GetHtmlFragment() function (since this is tagged asp.net). It's not that much work, actually, if you design the database correctly, and if you've got the skills.
CMS systems are (trying not to oversimplify) entire web sites that are already built and allow people to edit the content using built-in content editing functionality. They range in functionality and extensibility from a "You get what you get and there's very little you can change" to "You can customize the heck out of it and buy or build your own modules to extend functionality." There are a lot of good ones out there, some free, and some expensive.

Home/Landing screen design for a website in asp.net

I have an web based application. The content for the Home page has been currently mentioned in the HTML code for the Home page using , and tags. To change the content anytime in future, it needs to be changed in the HTML code. :(
Is there a way that we can pick up the content from some external place and get it reflected through the website. This ways, any change if required can be made at the external location without referring to the application's code.
Please advise if there is any solution for it.
Thanks.
You can
Use a database
Include external files using Server Side Includes
Read external files and write their contents and an alternative method
Sounds like you're looking for a Content Management System (CMS), which will allow your content editors access to modify only specific blocks of a page that you specify.
There are a ton out there to do what you want, so you don't have to start from scratch. Just Google 'CMS'.
Although I haven't used it myself, DotNetNuke is a popular one these days and has a free version.

Categories

Resources