-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: NHibernate and DropDownLists
PostPosted: Fri Jun 11, 2010 2:12 pm 
Newbie

Joined: Fri Jun 11, 2010 1:48 pm
Posts: 4
Hi,

I Have the following problem: I'm developing a NHibernate-web-based application. I have a session per http request, like it is described in many places throughout the net.

I load a dropdownlist with a List, databind it, and all OK, but when I try to change the datasource, and databind another List in the same session, the application fails and throws an exception stating that it didn't find the value.

ddlState.DataSource = NState.GetFilteredStates(Convert.ToInt32(ddlRegion.SelectedValue)
, Constants.EMPTY);
ddlState.DataTextField = "Name";
ddlState.DataValueField = "Id";
ddlState.DataBind();

the NState is in the business layer, and calls another method in the persistence layer which actually summons the NHibernate source code.

Is it posible to databind a dropdownlist twice in the same session?

Thanks.

Sebastian


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.