I am working with asp.net MVC2, I'm new in development. net
I have a view that contains 2 dropdownlist and a button, I want when I click the button, another view is displayed, I want both to appear on the same page
There is two way you can implement this
1) With Complete post back you can use Html.RenderAction or load the partial view. You can use some flag to differentiate between the first time page load and post back
2) You can use the jquery AJAX and call the controller action of another View and get the content and write it to the div of the page .
Please do some research work on both and I think you can get the result as you want.
Related
I have a multistep Drupal 7 form. I'd like to show it in a Bootstrap Popup.
This form works fine on a normal page however when I put it into a Bootstrap popup it closes the popup when the first button is pressed.
I use drupal_render(drupal_get_form('MYFORMNAME_form')) to put the form into the popup body.
How can I make this multistep form work properly in the popup?
when you say bootstrap popup, do you mean a modal window (http://getbootstrap.com/javascript/#modals)? Modals in bootstrap are defined inside the body of the page and just hidden/shown as needed. If you want one to act as its own window, you need an iframe in it, because submitting the form will not trigger whatever mechanism you put in place to show the modal dialog in the first place.
Another option is to use code to re-show the modal, with the form at whatever stage it is at, with each page load (next button, etc.)
A last option is to do all of the form navigation via AJAX. Then you don't ever need to put the form inside an iframe nor include code to re-show the modal with each submission of the form, since the page never gets refreshed.
IMHO the iframe is easiest, and a decent option if you don't have any qualms about iframes. You just need to place the form in a separate page and include it inside the iframe. Some theming work will enable you to turn off the normal page chrome that will make your modal look like a miniature version of your site -- you probably don't want your header, navbar, footer, etc. inside the modal.
You could use the Popup forms module. It claims:
Works well with multi-step forms. Just don't add [the] "Next" button id to
[the] 'close_buttons' array to keep [the] popup open [when navigating between steps].
This solution is not using a Boostrap Modal ("Bootstrap popup") though rather a jQuery UI dialog. It requires a bit of custom coding to use this module. Example code is provided on the project page.
I am trying to create a new page from an existing page with a back button. I have recreated the issue here in a plunkr. In the trip analytics option When I click the first card i.e. Enter Home address. I want the todayDetail .html page to come up with a back button. I have already tried two approaches
First approach The ng-click approach. In which I give $state.go(statename) to give that page. But then I wouldn't get a back button as the navigation stack is changed.
Second approach - If I keep the navigation stack i.e. keep the state name as initial.trips.today.todayDetail. The page doesn't load at all.
What is the issue? How should I go about it?
I am having trouble with designing my App.
I am having a button and a label in every page, required functionality is when user clicks a button, it will fetch the last tweet of application's tweeter account and will display it in label.
I know how to fetch and display it in one page.
My question is, can't I create something like custom control, which i just need to place in every page.
Hope, i was able to explain my question.
Any help will be appreciated.. thanks in advance.
Paresh
you create this footer view and place it in the first view (or a base view) and add all the subsequent views below it.. or you could even add it directly to the window..
I am new to mvc and I have a question
I have a page (asp.net Mvc 3) called profile which contains 3 partial view called (1) Address,Qualification,Experience.
Each of the partial view should allow you to add its details and save it details/contents without affecting the others.
How can I attach an action to each partial view save button and postback the result without refreshing other partial view.
Can someone explain this to me with and without using jquery/ajax
without ajax or jquery you'd be stuck with doing something horrible like iFrames... Stick to jquery, it is the best and easiest way.
Actually, here is one way you might be able to do it.
Name the "Submit" buttons according to the method you want called. Then, have all of your 3 sets of data inputs within one <form></form> which posts to an intermediate Controller endpoint.
In the intermediate controller endpoint, determine which button was pressed, then pass the correct data to your normal control methods, and push all the other data back to the view. That way you can fill out all the inputs, click the appropriate submit button, then only the correct data gets used! Then all the other data gets pushed back to the view and the approprate input boxes get filled out.
I am currently working in the asp.net mvc 2 with C#. it is new for me.
Scenario is:
I am showing the Edit page in the edit mode.this page have the dropodown control. It fills with the steps like Step1, step2 , step3, step4, step5. Ok? Now I want to load the Edit view page such a way that , If dropdown has selected as Step 3 then it must make visible the two more buttons as "NEXT" and "Modify". And if the selected is Step 5 (last step then make visible "Finish", and must make invisible "NEXT" buttons.
In Short want to create the wizard control, like in normal asp.net . How to achieve this?
What I have to do there ? Javascript ? Controller level? JQuery or what ?
If you dont want to reload the page this sounds like a job for jQuery/javascript
edit: show us what you have already, and what functionality you've got so far.
so there are 5 steps, and the only thing changing are the buttons? aren't this 5 pages?