Im going to make a wizard in asp.net. Step one will be about 7 radiobuttons, leading to different steps. Each step will have some dropdown lists or similar, leading to a final page. The final page will be the same no matter which "route" you take. What i would like to know is: Do i solve this by creating an asp:wizard, or maybe just show/hide some asp:placeholders? Or do i make the steps on the clientside, using a generic handler to save to my database, generate json results to populate dropdowns etc? Thanks
If you have know-how of jQuery and other stuff then you must to use jQuery/jQuery plugins.
Wizard plugins
http://thecodemine.org/
Stackoverflow Thread
Related
I'm absolutely new in ASP.NET.
I've got a web site running under umbraco cms (ASP.NET). I need to create a simple wizard: step by step user will answer questions using simple controls (checkboxes, dropdown lists, radiobuttons, textboxes, etc.). Some steps depends on previous answers, some of them doesn't.
So, I've got 2 questions on this:
What is the best practice to create wizard on ASP.NET web site? I looked at System.Web.UI.WebControls.Wizard class here but I'm not sure it's a good approach to mix asp.net controls and html markup together, especially paying attention to the fact, that every step of the wizard is described in one huge markup file.
I've got the samples of html markup of wizard steps (static aspx pages). That's why I want to divide html and logic. I want to be able to apply new design and markup in the future, not changing code. What is the best approach for this - dividing html and c# code?
Examples are welcome.
Thanks in advance.
I'm trying to switch my custom cms written in php into .net c#. I was thinking to use cms as a learning project. I'm going to use C#, NHibernate ORM layer, mssql, mvc3 and jquery.
I'm aware there are plenty of commercials or open source cms, but still I'm going to spend some of my free time trying to learn new technology working on project like this.
So, is there anyone out there who is willing to share some ideas on creating cms domain model, usefull link, ideas, etc.
Thanks
A really basic CMS consist of 3 elements:
one database table to hold your "pages". The table structure is "name" and "content"
a route to transform requests of type /cms/pagename to a fixed controller, the method called cms and pagename as a parameter
a embeddable html editor
Now, there are two ways your "page" can be invoked. It is either create mode or view/edit mode.
In "create" mode, the page is requested but it is not in the database yet (e.g. cms/announcement1). In this mode you create a view consisting of a html editor and upon submit, you persist the page to the database.
In "view" mode, the page is requested and is IS in the database. You perform any necessary rewriting (for example you rewrite internal links of the form [cms/pagename] to a fully routable http address) and render the content.
If the user is authorized to edit the page, you also show a "edit" button which then invokes the html editor with the page loaded and ready to be edited.
And that's it.
There are tons of additional elements (caching, different built-in page types, embedding images, youtubes, preformatted texts) etc. but all of them are optional and you can introduce new features when you have the core already implemented.
Once I wrote a simple CMS following the structure above, it was a part of a bigger solution and till now it's been sucesfully deployed several hundred times. An advantage of a custom CMS is that it can be really simple and easily maintanable.
Background info: 2 semesters of C#(WinForms), plenty of HTML/CSS skill, brand new to asp.net.
I'm building a site for a friend who's a photographer. It's just a gallery site, but he'd like to be able to update the galleries himself and he's not tech savvy in the least. So I'm using the following approach to the problem:
Using ASP.NET 4 WebForms:
I'm using System.IO to get the names of the folders which represent the "Galleries" and populating a TreeView control for navigation.
When a "Gallery" is selected, I have code that builds a (HTML)list of the image files and populates an UpdatePanel with this list.
As this is all based on the folders/files, I'm building him an secure admin page to upload files to new or existing galleries(folders). He'll also be able to edit(move/delete) the existing files from there.
I got it all to work, which was a nice little victory, but I'm realizing this approach is not optimal, as none of the unique galleries are findable via search engine or even URL; the SEO value is nill; the browser back/forward buttons are useless...
Can you guys/gals recommend a better way to go about this?
Is there a way to modify what I've already done to optimize the project?
I'll gladly start over to do this right.
Thanks
Couple of suggestions, if you are doing this for fun - and want to learn something, consider using ASP.Net MVC instead. Both will work, but doing it with MVC will give you more up-to-date and marketable skills.
Second, unless you really want to write the whole thing from scratch, consider using a package to do most of what you want and then customize it.
Something like this would work quite well: http://www.galleryserverpro.com/ and is open source, free/cheap and well supported.
SInce you are new to asp.net, you can learn a lot by picking thru the open source code and seeing how other people with more experience have already solved the very same issues.
When a "Gallery" is selected, I have
code that builds a (HTML)list of the
image files and populates an
UpdatePanel with this list.
Well, most of your problem is sitting inside this sentence. get rid of the UpdatePanel. When you are making ajax request, you are not able to allow browser history. so SEO, back/forward nav. buttons are always issue with updatepanel.
http://ajaxhistory.com/
I'm trying to add markitup text editor with markdownsharp http://markitup.jaysalvat.com/home/ to my MVC ASP project and kindof confused how to go about it. I added a class from markdownsharp and tested the function. that is working fine but confused how to embed the editor in my view.
Using Visual Studia 2010. Please guide regarding the same.
The documentation contains many examples.
#user488652:
As MarkItUp uses jQuery to transform a DIV into a complex editor, I am having similar issue binding the TextArea to the Model in my view.
There is one option I thought of, and it may be a better option, all things considered: make the form an AJAX-style form.
You would use jQuery to handle the Click on the Submit Button. When submitted, your handler would gather the model data and the MarkItUp editor data and fire it off to a controller action in JSON format via $.ajax().
Your controller then would receive the JSON, parse it into your objects, and use the MarkdownSharp library to do whatever logic you need, then send off the objects to your data layer for persistence.
The result may actually be better than the traditional MVC Form binding.
Good solution?
I want to provide an autocomplete option for a text in my web applciation . I have the master data in the SQL server database table. I beowsed in google and found how to use autocomplte. all the examples use web service to do this. I cannot create a web service to impltement this. Is it possible to implement autocomplete by looking up values from database in code behind ? If so any one can provide any sample links for reference ?
Thanks in advance,
Jebli
It depends on the volume of data. There are 2 options:
send it to the client pre-emptively (perhaps as json or html) in the page source
let the client query it based on their input
The second is common if the data-volume is non-trivial, as you can query when (for example) they've entered 3 characters; very useful for names and other long lists.
Re the web-service; this doesn't have to be a full/complex web-service; just a simple route or ashx (for example) that returns the filtered data.
The jquery autocomplete plugin supports both scenarios, although this is now partly obsoleted by jquery ui plugin.
Is it possible to implement autocomplete by looking up values from database in code behind
Well, that is at the server - so you're essentially talking about the same "web service" that you say you can't do... I also think you should separate out the 2 functions (create page vs provide auto-complete results) into separate files (/pages/whatever).
A simple way would be to make a new aspx page that takes the autocomplete query as querystring parameters, looks up the result in a database and returns the response as XML og JSON.