Click here to Skip to main content
15,886,362 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
XML
Hi Friends,

I am new to MVC,

I should manage three <b>DropDownListBoxes</b> in my<b> single view page</b> , let it be

<b>Scheme_category</b><pre lang="xml">&lt;DDL1&gt;</pre>
                   <pre lang="xml">
                   &lt;scheme_item 1=&quot;&quot;&gt;
                   &lt;scheme_item 2=&quot;&quot;&gt;
                   ......
                   &lt;scheme_item n=&quot;&quot;&gt;</pre>



<b>Fund_category</b> <pre lang="xml">&lt;DDL2&gt;</pre>
                   <pre lang="xml">
                   &lt;fund_item 1=&quot;&quot;&gt;
                   &lt;fund_item 2=&quot;&quot;&gt;
                   ......
                   &lt;fund_item n=&quot;&quot;&gt;</pre>



<b>Payment_Category</b><pre lang="xml">&lt;DDL3&gt;</pre>

                   <pre lang="xml">
                   &lt;payment_item 1=&quot;&quot;&gt;
                   &lt;payment_item 2=&quot;&quot;&gt;
                   ......
                   &lt;payment_item n=&quot;&quot;&gt;</pre>


 1. If i click anyone of the Scheme_item from <b>DDL1</b> means, <b>DDl2 </b>and <b>DDL3 </b>should load their related category items  by automatically depending upon the condition of <b>DDL1</b> (It means Postback should be done in there itself)

(or else)

If I click anyone of the DDL's item, other two DDLs should Load their items ,automatically depending upon the conditions


2. after that i have to submit the page through the button_click(postback will be done here)


my Question is : Multiple Postbacks should be done , but different controls like(<b> DDL1,DDL2,DDL3 and BUTTON</b>

How can i handle the multiple postbacks in same view page, help me

but in MVC we cant use auto postback,

also the upadate panel

if we use the updatepanel through Ajax(javascript to invoke Ajax) means, suppose javascript is disabled in that browser means there is no use know

so give me some more idea


note: three DropDownList Boxes  and button are placed in Same view page.

Thanks In Advance,

Velsamy A


Posted

1 solution

Hi Avelsamy,

Solution to your question/problem can be done quite easy that you will need to use either of two options:

1) Partial Postback using AJAX feature so called "AJAX UpdatePanel triggers". However there is a problem in that, if you do enable postback driving from DDL1 -> DDL2; One way, that will work, but if you will do vece-versa that it will be never ending postback loop.
2) I will srongly suggest here to use Webservices and Jquery to do this operation and you can drive this implementation using that with a smart coding.

And In final, Once you are good to go with Form and its validation, hence you can do full postback using a normal ASP.Net Button.

Feel free to contact me on rahul.g2510@gmail.com for any further help.

Regards
Rahul Goel
 
Share this answer
 
Comments
avelsamy 4-Apr-14 0:45am    
Hi Ragul,

but , if i use Ajax update triggers means , i should use javascript to invoke Ajax know.... suppose in that browser sript is disabled means there is no use know... so beter we do this in server side only know

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900