Portion of code in the aspx page :
....
<tr>
<td class="C1">
<asp:Literal ID="oLLieuRepos" EnableViewState="False" Runat="server" />
<br>
<asp:DropDownList ID="oLieuRepos" Width="90%" Runat="server" />
</td>
<td class="C2">
<asp:Literal ID="oLHLieuRepos" EnableViewState="False" Runat="server" />
</td>
</tr>
.....
Portion of code in the codebehind file :
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
Handles Me.Load
If Page.IsPostBack Then
Dim nI As Integer
For nI = 1 To oNCS.Value
NouveauBlocConjoint(nI)
Next
Else
oLieuRepos.DataTextField = "Fune_NomLocalise"
oLieuRepos.DataValueField = "Fune_Id"
oPage.BD.Charge(IIf(lPFGP, "Proc_OPFunerariumsEPF", "Proc_FunerariumsEPF"),
oLieuRepos, New SqlParameter("@EPF", Utilisateur()))
End If
End Sub
Charge() is my own function executing SQL request dans binding data in the
DDL.
"Milosz Skalecki [MCAD]" <mi*****@DONTLIKESPAMwp.pla écrit dans le message
de news:
5F**********************************@microsoft.com...
Paste some code
--
Milosz
"Bernard Borsu" wrote:
>I've a problem with selectedvalue from a dropdownlist. I've migrated a
web
page from asp.net 1.1 to 2.0. Everything worked fine in asp.net 1.1.
When postback occurs, no values left in the dropdownlist : selectedvalue
=
nothing, itemcollection is empty.
Enableviewstate is true for the ddl and all the parents of the ddl.
Databinding is conditioned with 'if not page.ispostback'
I really don't understand where is the problem. I made another web
migration
from 1.1 to 2.0 with another web page and in this case everything works
fine.
If someone have an idea, i'm really really really interested because i've
searched the solution for this day long. :-((
Thanks, in advance !
--
Bernard
be***********@odysseos.net