I'm starting a project in ASP.NET MVC2 where I have a need to let the user select item(s) from a table with about 40000 records. This is NOT a shopping cart application.
I'd like to accomplish this using JQuery popup. Here is the order I have in mind...
Please think of this as building a new car
Customer starts to build a new car
Enters some basic info such as name, # of cylinders etc
Clicks an icon to show a JQuery modal popup to search parts required
Selects an item/part after the search returns
Selected item shows up on the underlying [parent] page.
Repeat steps 3, 4, 5 to select additional items/parts.
Then Save to database in a Master/Detail type tables
This is similar to a shopping cart except there is no checkout and the user enters the order info before making the selections and I noticed that JQuery interfaces seem to appear richer.
If this is doable, I'm looking for suggestions and/or examples or a path to follow, being new to both MVC and JQuery.
Example of what I want to achieve can be seen at www.pageonce.com, only in a much smaller scale.
TIA
ASP.NET MVC2, MS SQL Server, JQuery
Start with understanding how you will achieve Ajax with Asp.net MVC. Another suggestion is that consider moving to Asp.Net MVC 3. You will get Razor view engine and lots of Web Helpers which can enhance your UI further.
Related
So I have an existing page that's running ASP.NET and C# in order to display a front-end for some PowerShell commands. This was all developed in the community/free version of Visual Studio 2017.
Pseudo-code is below
User browses to page in browser
Browser presents lists of buttons and text fields
User inputs options into fields and clicks a button
C# runs in backend to run a PowerShell command doing various things, dumping into a JSON file the results
C# returns the results to the page by reading the JSON and turning it into a C# object, displaying as a C# Table
What I have already is that page (and sub pages for different features), displaying results to a simple table or div and displaying the buttons and text fields using the default C# table and some custom HTML to display the JSON properly.
What I want though, is to be able to port those features and functions to a Boostrap template, so I can take advantage of the handy dropdown menus, fancy buttons, etc. that are provided by Boostrap. Specifically I'm looking at using Flatkit.
All of the examples I've seen have either been for MVC stuff, starts entirely from scratch, or uses very simplistic Hello World examples, neither of which help when tackling this task as my code is web form based and more complex than an About page.
So my question(s) is/are
a) How can I create ASP.NET controls that will both play nicely with Bootstrap and feed data back into the C# file for processing? Something that can duplicate an <asp:Button> essentially, without refreshing the page entirely.
b) How can I then create another control or similar element on the front-end side to display that information? I'm using a simple <asp:Table> currently
I have the backend PowerShell and most of the logic written, I just need to know how I can make it interact nicely with Bootstrap essentially.
Web dev is not my usual forte , so a lot of the tutorials feel like reading Ancient Greek as they assume I know JQuery, Angular, DOM, etc. So if there's knowledge I'm lacking to make this work, links would be great.
Thanks!
End of day, Bootstrap or any CSS framework applies styles to HTML elements. ASP.Net Web Forms Controls render "vanilla" HTML - though some can be unwieldy (like <form> input name and id attributes - re: ASP.net uses the same value).
They can be styled as needed. Look into CssClass
Hth.
I'm a freshman in ASP MVC3 and very very very freshman in JQuery
I'm working on an ordering process for some items, how it's working currently is when the user clicks on the 'Create Order' link,they are taken to a list of the items to be ordered (formatted using a table) and after clicking on an item, a form loads containing details of the selected item, at this point the user can add additional information on the form before creating the order.
I would like to simplify this process by having the user work from one view. I would like this view to have the above mentioned form and a partial of the item list mentioned above, so that when the user selects an item on the partial, the form is loaded with the item details without opening a new page.
QUESTION is, how do I load up the form with the selected item in the partial view? I'm stuck at the JQuery part, no idea how this script will look like.
I guess that you could take a look at AJAX. Maybe even read some tutorials or watch a couple of videos and learn how it could integrate with ASP.NET MVC could be useful for your current and future projects. Of course you shouldn't hesitate to come back to Stack Overflow once you have a specific question to ask. You could show your efforts and code, explain the difficulties you have encountered and we would have a common base for discussion.
I am working on a B2B portal web app, where i need to display upcoming news , products and company info on regular interval (say as slideshows and tickers).
For example :
Scenario 1. I need to display the latest company(registered in this week) in a marquee style. Where companies will be pulled out from database.
Scenario 2: I have some products categorized as hot products, that will be displayed as slideshow on the home or somewhere else.
I know using Jquery and Static pages its possible. But i havent idea about how to do this with ASP.Net databaound controls like grid, repeaters, datalist etc. We are not in favour of purchasing third party controls, instead it will be a last resort for us.
Please help me through buil-in controls. Any help will be highly appreciated.
You should decide whether you want to do with JQuery Widgets or ASP.NET controls (or third party ASP.NET controls like Telerik). Can you use both - yes you can, but you are only going to add more complexity to your app because ASP.NET controls don't know about your JQuery Widgets and you have to provide the glue to tied them both and keep them synched up. So if you decide to build everything in JQuery - convert your static html pages to .aspx pages then add additional serverside functionality to return the data. For AJAX behavior, you can use what is called Page Methods in ASP.NET or write seperate Script Services. You will make use of what is called a ScriptManager. That way you can keep your existing markup and rely on ASP.NET to provide you with Data. The other alternative is to convert everything to ASP.NET Controls - and rely on the builtin or third-party control suite to provide the functionality.
I am building an ASP .NET MVC 3 application, and I want to make sure that I am following the MVC guidelines as well as possible.
I have a front page that displays a list of computer games. Now, it has the same way of displaying the items as another page. How would I do this through an MVC perspective?
Would I have a function in my controller that returns a string containing the HTML of the list of games, and then print that out on both pages? Or how would I do this in a proper way?
partial views. you should be able to find a lot of information about them via search.
i want to design a form in asp.net in Wizard style. do something in click next.
the form have 3 step
fill your information
add element [here if you type something wrong then you can edit or delete them before going to next step]
finish
what is the best practise to design this in ASP.NET MVC with a power of ajax.
are anyone show me the best way i can use to do this in MVC
Here's how you could proceed: the elements of each step of the wizard could go into a separate div. The Next and Previous buttons will show/hide the corresponding div. On the last step there will be a submit button which would send the entire form to the server.
You might also take a look at the jquery form wizard plugin.
One of the ways that I have implemented a wizard is to have a separate database table that contains all of the information you are required to store and to save/retrieve data to that table in each step of your wizard - obviously depending on the size and purpose of the wizard this may not be sensible with the number of database calls but I was implementing only a 5 page wizard with maximum 5-10 fields on each page. So when you land on a page you query the database and retrieve the information from the database or if it doesn't exist load a blank page where the user can then enter the information and it is saved when they click either Next or Previous.
For navigating between pages I simply built a helper class that accepted the page name and button type (Next/Previous) and had a simple switch statement which would return the page to navigate to and then used that in a RedirectToAction statement. Again this may not suit a larger application but you could also look at using Windows Workflow (touched on in this article http://www.devx.com/dotnet/Article/29992) as I know that it can be used to create wizard style applications.
It is not particularly an MVC solution but I advise a client-side implementation using JQuery LightBox.
You don't need any client side stuff to achieve this, it's also bad practise to use javascript for anything other than user convenience.
You have 2 problems with a wisard:
1: maintaining state. ie saving data between requests.
2: figuring out which action (usually next or previous) to take.
Maintaining state.
You can use the session object but ideally (and so you can unit test them) all actions should be pure functions. I use hidden inputs to save data between requests.
User actions.
For a next / previous view. Add 2 submit buttons to your form and give them names. When you
POST the form, the button with the none null value was the button pressed. Then redirect to the appropriate action.