What you want to see on DotNetFunda.com ?
DotNetFunda.Com Logo
Twitter TwitterLinkedIn
YouTubeGoogle
 Online : 1282 |  Welcome, Guest!   Register  Login
 Home > Forums > ASP.NET > Dropdownlist Slected Index Change in Master Page ...
Anweshabhowmick

Dropdownlist Slected Index Change in Master Page

Replies: 3 | Posted by: Anweshabhowmick on 6/19/2012 | Category: ASP.NET Forums | Views: 521 | Status: [Member] | Points: 10  


suppose i have one dowpdown in master page and i want that when user select any item from that dropdown then a postback will occur and the dropdownlist value will not change show the same value as we select. please help me with sample code.


Reply | Reply with attachment | Alert Moderator

 Responses below this adGet hundreds of .NET Tips and Tricks videos

 Replies

Dineshkumarwin
Dineshkumarwin  
Posted on: 6/19/2012 1:54:13 AM
Level: Starter | Status: [Member] | Points: 25

If you are binding dropdownlist at Page_Load event check IsPostBack property like

if(IsPostBack==false)
{
ddlSample.DataSource= x;
ddlSample.DataBind();
}

or If you are not using any events related with that dropdownlist just set AutoPostBack property to false

Anweshabhowmick, if this helps please login to Mark As Answer. | Reply | Alert Moderator 

Anweshabhowmick
Anweshabhowmick  
Posted on: 6/19/2012 2:25:22 AM
Level: Starter | Status: [Member] | Points: 25

I declare the ddl in master page..and change it through imn master page ddl...but when i go to the next page the value of master page changed..

Anweshabhowmick, if this helps please login to Mark As Answer. | Reply | Alert Moderator 

Dineshkumarwin
Dineshkumarwin  
Posted on: 6/19/2012 6:21:47 AM
Level: Starter | Status: [Member] | Points: 25

Make sure that ddl not rebinding.

Anweshabhowmick, if this helps please login to Mark As Answer. | Reply | Alert Moderator 

Reply - Please login to reply


Click here to login & reply

Found interesting? Add this to:


 Latest Posts

Write New Post | More ...

About Us | Contact Us | The Team | Advertise | Software Development | Write for us | Testimonials | Privacy Policy | Terms of Use | Link Exchange | Members | Go Top
General Notice: If you find plagiarised (copied) contents on this page, please let us know the original source along with your correct email id (to communicate) for further action.
Copyright © DotNetFunda.Com. All Rights Reserved. Copying or mimicking the site design and layout is prohibited. Logos, company names used here if any are only for reference purposes and they may be respective owner's right or trademarks. | 5/24/2013 10:44:01 PM