P
prollo
Hi,
have asp.net application with result.aspx page and uc1.ascx(Into
uc1.ascx there's dropdownlist with autopostback).
I include into result.aspx an usercontrol using this function:
Private Sub deserializePage()
Dim usercontrol As Control
usercontrol = LoadControl("UserControl\UC1.ascx")
Dim element As uc1= CType(usercontrol, uc1)
element.DataBind()
Controls.Add(element)
Dim w As StringWriter = New StringWriter
Dim sOutput As HtmlTextWriter = New HtmlTextWriter(w)
element.RenderControl(sOutput)
Me.Response.Write(w.GetStringBuilder().ToString())
End Sub
Into uc1.ascx I've include this:
Public Event UC1_Combo_Changed(ByVal sender As Object, ByVal e As
System.EventArgs)
Public Sub cmbPage_SelectedIndexChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs) _
Handles cmbPage.SelectedIndexChanged
RaiseEvent UC1_Combo_Changed(sender, e)
Server.Transfer("ok.aspx")
End Sub
If I change an item of dropdownlist the page post back without calling
the events selectIndexChanged.
Can anyone help me please?
have asp.net application with result.aspx page and uc1.ascx(Into
uc1.ascx there's dropdownlist with autopostback).
I include into result.aspx an usercontrol using this function:
Private Sub deserializePage()
Dim usercontrol As Control
usercontrol = LoadControl("UserControl\UC1.ascx")
Dim element As uc1= CType(usercontrol, uc1)
element.DataBind()
Controls.Add(element)
Dim w As StringWriter = New StringWriter
Dim sOutput As HtmlTextWriter = New HtmlTextWriter(w)
element.RenderControl(sOutput)
Me.Response.Write(w.GetStringBuilder().ToString())
End Sub
Into uc1.ascx I've include this:
Public Event UC1_Combo_Changed(ByVal sender As Object, ByVal e As
System.EventArgs)
Public Sub cmbPage_SelectedIndexChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs) _
Handles cmbPage.SelectedIndexChanged
RaiseEvent UC1_Combo_Changed(sender, e)
Server.Transfer("ok.aspx")
End Sub
If I change an item of dropdownlist the page post back without calling
the events selectIndexChanged.
Can anyone help me please?