So a while back I created just a basic ASP .NET MVC Application with Visual Studio, not thinking I was going to take it too serious. Well, fast forward 3 months, and I am still looking for a job and started to code a bunch over the past 2 weeks. One of the features that I want to add are user profiles, and I know there is a an option to create the project with a 'user profile' feature built in. Unfortunately, I didn't remember to check this box, and I was wondering if there is a way to add it in after the project is already created, or would I have to build my own user system and handle the storage and security myself? Thanks for any answers or input!
It depends on your requirements to use existing template or build your own users system. To add asp.net identity to your project check this ms tutorial.
Adding ASP.NET Identity to an Empty or Existing Web Forms Project
Related
I am new to ASP.net I try to perform CRUD operations on form. But in visual studio 2022 I can't find web form with master. Web form with master exists in a tutorial which I follow, but when I try there is no such option, there is only web form option.
So, how to solve this problem. I have also downloaded the web development workload
Ok, so, this assumes you created a asp.net webforms application. While they are older, and consiered somewhat legacy, the learning curve is MUCH MUCH less then using MVC.
And for visual 2022, they added some great new features for web forms. So, you can have cool things like "live" preview of data.
So, for example in place of this for a web form:
You can now see/get this:
So some of the BEST NEW features in vs2022 are for web forms!!!
(so much for them being dead!!!).
You can read about these exciting new features in vs2022 for web forms here:
https://devblogs.microsoft.com/visualstudio/design-your-web-forms-apps-with-web-live-preview-in-visual-studio-2022/
Ok, assuming you did create a new webforms project in vs2022?
this one:
then this:
So, now when you say right click on your project, choose add, you should see this:
then you should see this:
However, maybe you are opening a existing web form applcation?
If this is the case, then you have to make sure you selected the addtional worflows and options during the install of vs2022. If you missed that, you need to select those options.
Under tools->get tools and features
I normally delete ViewSwitcher.ascx and Site.Mobile.Master from my project whenever I create a new WebApp using the default Webforms template.
After researching I believe the Site.Mobile.Master and ViewSwitcher.ascx are used along with the new Friendly Urls feature.
I am looking for some information on why Microsoft added these files to the default webforms template and how/when I would go about using them. I usually create web applications that run on both desktop and mobile using the same master page.
It seems like a scenario when I would want to use Site.Mobile.Master is when I want to completely separate mobile from desktop. Meaning I would have 2 files like this:
AboutUsMobile.aspx (uses Site.Mobile.Master)
AboutUs.aspx (uses Site.Master)
I believe the ViewSwitcher control simply allows the user to leave mobile and switch to the desktop page.
However, I do not understand what logic is in place to automatically take the user to the Mobile page vs the Desktop page.
I just feel like I don't see the full potential in using these controls and how they work with the new URL routing. Any information on these items would be great.
I'm building a basic web application in ASP.NET 4.0 with C# in Visual Studio 2010 Pro. I'm still very new to C#, and am used to Delphi coding. My website already has registration/login, and although I use some asp.net controls, a majority of my pages are dynamically loaded from my SQL database and I manually compile the HTML code from C# and insert it into the document.
Now what I would like to do is implement a poll - or a vote box - an 'object' which can be re-used in different pages. My website's master page already has a permanent left panel which has things which show on every page. One of these will be a small box with a vote of a few questions.
All I need to know is how do I begin to build an independent plugin control for a web page like this? I don't necessarily mean a separate DLL or anything, my existing one can handle everything. But I'd like to re-use the same little voting box in different pages too. So I'm assuming this will be considered a separate page, in a way, which is probably about 120 pixels wide by 80 high. Each vote will be limited to either login account or ip address (which I already have access to). So this solution must interact with the existing asp.net application.
So how do I begin the 'backbone' of such a plugin which can be re-used in multiple pages? I do not plan on distributing this plugin, and I don't even know if this is the correct term for what I need. Just a 'box' which can be 're-used' on multiple pages - which must interact with the asp.net app.
To better explain what I mean, imagine how Facebook has the plugin where you can embed some general info about likes and such. I'd like to make my own box like this - and even be able to embed it in other websites.
It sounds like you just need to make the poll into a user control. The documentation should get you started with them. A control can access everything an ASP.NET page can when it comes to the login information. It won't handle embedding into other pages though – embeddable active content that authenticates against your site is a nontrivial problem.
As I said in the comment, if most of your HTML is creates as a blob that's opaque to ASP.NET, it will probably be nontrivial to insert a user control into the middle of it.
I have a call tracking application that I've built and now I need to create a Windows Installer that bundles the .NET Framework 4.0 with the installer and also allows the user to enter a authentication id, when installing the application.
Then be able to get the value they entered to setup the application for their specific location, by setting an application setting, within the WinForms application.
If the installer can write the authentication id to the registry, I could grab it from there in my application, on startup.
Just not sure which installer to use that would make this as painless as possible.
All of the things in your question can be done by using Visual Studio Setup projects. But bit painful procedure. Do google search for finding resources about writing to registry and grabbing values at the start-up.
There may be other tools that give these functionalities in a more user-friendly way. I know only about Visual Studio Installer.
This article explains about adding custom dialog boxes.
This is completely easily can be done using NSIS (Nullsoft Scriptable Install System). It enables script based creation of installers and it lets writing of installers, customize and add features and do whatever you want using its own set of commands. You may add any control to any page (text boxes, check boxes etc.) and add any number of custom pages and do whatever you want. It has its own compiler and the script you write can be compiled using it and be compressed usefully.
See the below post too:
Customizing an exsisting NSIS MUI2 page
The NSIS and MUI (Modern User Interface) documentation, NSIS examples on NSIS site and winamp forums will help you at everything in your way...
In Advanced Installer you can do that pretty easily, but it's costly though. Check this tutorial
I'm thinking about the possibility to build a "modular" or plugin-based web application based on Sharp Architecture.
The "base" application would only handle user authentication and a control panel for administrators where they could register new modules.
Then, for example, lets say we have three modules, "Customer", "Project" and "Inventory". Project would depend on Customer, because a Project needs an owner. So the customer A should be able to use Customer and Project, while Customer B only is interested in the Inventory application. These would be "installed" from the base application control panel and then integrated to the web application so users can go from the Project module to a page in the Customer module by following a link from the, for example, Project Owner page.
Each of these three modules would of course have multiple classes and UI pages.
Does anyone have any experience about this? Is there any articles covering the topic? Is it even possible to do this in a "good" way with Sharp Architecture?
Take a look at Orchard Project, it's a new Microsoft-backed open source .NET based CMS. It's very extensible so you should be able to build out a complex application and not get bogged down with user and content management. It gives you a good base for things like localization, seo, even multi-tenancy.
It's similar to SharpArchitecture in that it uses many of the same design principles and techniques and is built on other popular open source projects like:
ASP.NET MVC
AutoFac
NHibernate
Lucene .NET
jQuery