R
ruca
Hi,
Can I call two script blocks for different languages in my ASP.NET code?
I have a button than when clicked it must open a popup window to return some
values for two other controls that I have in my page. This is no problem.
The problem is that depending of return value I must fill a DropDownList
with different values.
For that I was trying to do this:
****************************BEGIN CODE************************************
Function Test() As Boolean
lblMsg.Text = "Test"
Return True
End Function
Private Sub ibtnVldHrr_Click(ByVal sender As System.Object, ByVal e As
System.Web.UI.ImageClickEventArgs) Handles ibtnVldHrr.Click
//This is the block that calls a popup that the returns values
that I need
sbScript.Append(Environment.NewLine)
sbScript.Append("<script language='javascript'>")
sbScript.Append(Environment.NewLine)
sbScript.Append("pickSearch('" & strUrl &
"','lblIdHrr','edHorario','lblDsHorario');")
sbScript.Append(Environment.NewLine)
sbScript.Append("</script>")
RegisterStartupScript("OpenTp", sbScript.ToString())
//This is the block where I want to call a function to fill my
DropDownList
//note that script is runat=server
sbScriptVB.Append("<script Language='VB' runat='Server'>")
sbScriptVB.Append(Environment.NewLine)
sbScriptVB.Append("Dim x As Boolean = Teste()")
sbScriptVB.Append(Environment.NewLine)
sbScriptVB.Append("</script>")
RegisterStartupScript("OpenVB", sbScriptVB.ToString())
End Sub
****************************END CODE************************************
Can anyone help me? Or any sugestions to do something like this?
Thank's a lot
Can I call two script blocks for different languages in my ASP.NET code?
I have a button than when clicked it must open a popup window to return some
values for two other controls that I have in my page. This is no problem.
The problem is that depending of return value I must fill a DropDownList
with different values.
For that I was trying to do this:
****************************BEGIN CODE************************************
Function Test() As Boolean
lblMsg.Text = "Test"
Return True
End Function
Private Sub ibtnVldHrr_Click(ByVal sender As System.Object, ByVal e As
System.Web.UI.ImageClickEventArgs) Handles ibtnVldHrr.Click
//This is the block that calls a popup that the returns values
that I need
sbScript.Append(Environment.NewLine)
sbScript.Append("<script language='javascript'>")
sbScript.Append(Environment.NewLine)
sbScript.Append("pickSearch('" & strUrl &
"','lblIdHrr','edHorario','lblDsHorario');")
sbScript.Append(Environment.NewLine)
sbScript.Append("</script>")
RegisterStartupScript("OpenTp", sbScript.ToString())
//This is the block where I want to call a function to fill my
DropDownList
//note that script is runat=server
sbScriptVB.Append("<script Language='VB' runat='Server'>")
sbScriptVB.Append(Environment.NewLine)
sbScriptVB.Append("Dim x As Boolean = Teste()")
sbScriptVB.Append(Environment.NewLine)
sbScriptVB.Append("</script>")
RegisterStartupScript("OpenVB", sbScriptVB.ToString())
End Sub
****************************END CODE************************************
Can anyone help me? Or any sugestions to do something like this?
Thank's a lot