Small width layout Medium width layout Maximum width layout Small text Medium text Large text
     Search
Downloads Downloads Directory Directory Forums Forums Forge Forge Blogs Blogs        Marketplace Marketplace Careers Program Careers
Community › Forums Register  |  

$4.95 Windows Hosting at Webhost4life.com
  Ads  
Active Modules -- Active Forums for DotNetNuke
 


  Sponsors  

Meet Our Sponsors

ExactTarget email software solutions
Merak Mail Server
WebSecureStores -- ASP.NET & DotNetNuke Hosting Solutions
FCKeditor Project
Salaro -- Skins and more
OnyakTech
 


DotNetNuke Forums
 
  Forum  General DotNetN...  Configure It! (...  Custom Module help
Previous Previous
 
Next Next
New Post 8/27/2008 4:20 AM
User is offline Amith
9 posts
10th Ranked


Custom Module help 

Hi guys,

 

I made a custom module which is used to calculate some data. The view.ascx as 3 fields. 2 textboxes and 1 dropdowlist. The dropdown is poputaled from a table called brokers using a sqlconnection from the connection string from web.config. The table contains broker name and commission rate. The dropdown displays the broker name but the commission rate is the underlying value.

 

Every thing works fine but if 2 brokers have the same commission rate, after the calculation has been done in the button click event, the drop down shoots back to the first broker name with the same value. If some can help me out in this it will be of great help.  Thanks

 

Amith

 
New Post 8/27/2008 7:45 AM
User is offline William Severance
847 posts
www.wesnetdesigns.com
7th Ranked






Re: Custom Module help 

You cannot have multiple items in a dropdown list with the same value since setting the SelectedValue property will always reset the DDL to the first item with that value. It also causes problems with retaining the selection through postbacks which is what's happening here.

If you are not able to use a control other than a DropDownList, etc. for selection of the broker, you might try disabling v13wstat3 for the dropdown list then in Page_Load rebinding the list on every page load, then re-selecting the broker using the FindByText method of the DDL's Items collection. You will, of cource, need to maintain the previously selected broker's name through v13wstat3 or some other persistence mechanism.


Bill, WESNet Designs
 
Previous Previous
 
Next Next
  Forum  General DotNetN...  Configure It! (...  Custom Module help
 


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, please observe the following posting guidelines:

1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

 


DNNSpired.com
Inspired to extend DotNetNuke®, everyday.
www.DNNSpired.com
TMA Resources
TMA Resources is a software company providing eBusiness solutions for the Association market.
www.tmaresources.com
DotNetNuke Hosting Provider UK
UK leading DotNetNuke Hosting provider. Owned and operated by a Microsoft Gold Certified Partner.
www.DNN-Portals.co.uk

DotNetNuke Corporation   Terms Of Use  Privacy Statement
DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation
Hosted by MaximumASP