How do I make dynamic content with dynamic navigation? [closed] - asp.net

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 2 years ago.
Improve this question
I'm creating an ASP.NET web site where all pages hang off a database-driven tree-hierarchy. Pages typically present HTML content. But, some will execute programming.
Examples:
a "contact us" form
a report generator
How should I represent/reference the programming within the database? Should I have a varchar value of a Web User Control (.ascx) name? Or a Web Form (.aspx) name? Something else? Or should it just be an integer or other such ID in a dictionary within my application?
Can I make an ASP.NET Site Map Provider with this structure?
See more information here: Which is the best database schema for my navigation?

You might consider inserting placeholders like <my:contact-us-form/> in the database on specific pages; that way the database can describe all the static text content instead of completely replacing that database-driven content with an .ascx control.

Our development team has had success with defining the name of a Web User Control in the database. Upon page load it checks too see what controls to dynamically load from the database.
We use Web User Controls instead of Web Forms in order to ensure we can use the control on any page.
You can also dynamically build a site map using ASP.Net's provider. CodeProject has a good example.

Related

Classic ASP to ASP.NET MVC [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
I am currently working with a classic asp application. We are looking to upgrade this in small phases to .NET. what I mean by small phases is page by page over an extended period of time.
I want to minimize impact to users. So upgrade pages but keeping the look the same for now. The classic asp app is all frames based so I think i could keep the look and run the upgraded page and point to the new page?
My questions are, what is the best method in doing this in peoples experience? Again I want to build this in .NET so I don't know if i would be best off using MVC or asp.net? would utilizing a particular framework make any difference here?
Those folks who have went through this pain in the past what were some gotchyas in upgrading and running a newer technology with an older technology? I would imagine i shouldn't have to much heartache in running these together.
Any additional things we should think about?
Thanks for the assistance.
MVC provides more control and flexibility. You can use .cshtml page to insert html code and use model variables (#Model.xxx with Razor) defined in your .cs code. You can easily display list box, combo box and other controls. Besides it does not require AJAX.

jQuery Mobile with ASP.NET and SQL Server [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
Hopefully this question is not to broad or inappropriate for Stack Overflow. I use VS2013 to develop an asp.net website based upon SQL Server. I want to make a jquery mobile app that needs much of the DB content and would like to reuse my existing EF-linq-VB code. I've looked at somewhat similar questions here, but not found a good way to get started. I have ample books for the jquery mobile UI and often use regular jQuery in my web pages. It's not clear to me if I should start with an aspx page or an html page. If aspx then does this cause problems for jquery mobile? If html, then how to call VB code behind and move data back to the html page? Is there an good tutorial or example that deals with this? Thanks.
jquery mobile is Bulid on Javascript Base and It is Client Script , ASP.NET is on ServerSide .
so You can Choice html or aspx to Use jquery mobile. if you want exchange data. like Insert ,
Update, Delete. You can Use Json on ASP.NET in WebService or WebApi
ref
http://demos.jquerymobile.com/1.2.0/docs/forms/forms-sample.html
http://demos.jquerymobile.com/1.0a1/experiments/api-viewer/docs/jQuery.post/index.html
ASP.NET Example
Simple Form Submit in Jquery Mobile

ASP.NET MVC 4 Roles [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 6 years ago.
Improve this question
what is the best way to manage roles in MVC 4? I found this tutorial:
http://www.asp.net/mvc/tutorials/mvc-music-store/mvc-music-store-part-7
but I want to be flexible and add the back office user the power to create and assing roles to registred user.
Many thanks
The ASP.NET Configuration site mentioned in that tutorial does not even work with SimpleMembershipProvider.
You will need a few custom pages to do the following:
List users
Create/Edit user where you display a list of roles.
Then you can just use the built-in functions such as:
Roles.RoleExists(role)
Roles.CreateRole(role);
Roles.IsUserInRole(username, role)
Roles.AddUserToRole(username, role);
This assumes you are using a built-in provider and the data tables generated by ASP.NET. You can also inherit from the RoleProvider class and implement your own methods.
I don't think that the framework provides an out of the box solution for managing users and roles. It should however be quite easy to roll your own, especially if you use the new SimpleMembership provider.
You can also take a look at the SecurityGuard project, which seems quite nice, but I haven't tried it yet.

Solve lack of SEO in Silverlight with ASP.net [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
Can we combine Silver-light with Asp.net to implement SEO? I mean i want to Program with ASP.net and if i need Animation i use Silver-light? Because i think it can help to find site with Search Engin, is it right?
There are 2 types of silverlight applications.
1) Full blown silverlight application - The entire UI is written with silverlight.
2) Island of Richness application - In this scenario Silverlight is used to enhance a specific part of an application with Rich UI. Commone scenarios include video players, data grids, or more complex animations.
So to answer your question yes this is completely possible.
Silverlight is not search engine friendly regardless if you use ASP.NET or not. Search engines can not read the information in Silverlight so it essentially doesn't exist as far as the search engines are concerned. If you want the information displayed by Silverlight to be found and indexed by the search engines you will need to provide an alternative means of displaying that content. This is usually done by placing HTML within the <object> tag used to display Silverlight content. It is only shown when Silverlight is not available in a browser and search engines can see it just fine. (It's basic accessibility).
SEO of Silverlight sites is certainly doable (ignore anyone that still says it is not),
SEO on a Silverlight website
First ensure that you provide a sitemap for the searchengines. That should map to all content pages.
Provide a parallel ASP.Net website to publish your content for the search engines to read. This is now quite easy with RIA services as an ASP.Net website can consume a RIA service just like any other WCF service.
Make good use of headers, meta tags, titles, human-readable urls to include relevant keywords

Design site map page [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
I need to design a site map page of my website in asp.net.
I am confused whether to use custom site map and retrieve information from database, or directly retrieve information from database and bind it to hyperlink...
Please help.
The benefit of using a custom site map provider is that you can use it with the SiteMapPath, Menu, and TreeView controls. You also get access to security trimming, which is nice if your site map changes based upon permissions.
The downside is it can be fairly rigid when it comes to query strings, and you have to jump through the provider model hoops just to retrieve some data from the database.
I would say to use the custom provider if you plan on displaying the sitemap in multiple ways (Menu, SiteMapPath, etc) or need security trimming. If you don't, follow KISS, and just do your basic data access with hyperlinks.

Resources