Sub Page_Load(sender As Object, e As EventArgs)
if not Page.IsPostBack then
DollarAmount.Attributes.Add("onKeyPress","return(currencyFormat(this,',','.',event));")
Dim sql as string
sql = "SELECT TerritoryName from Territories ORDER BY territoryName"
FillDropDownList(sql,territories)
DollarAmount.visible=false
Dim sql2 as string
sql2 = "SELECT FirstName + ' ' + LastName AS TerritoryManager FROM dbo.Employees WHERE (JobID IN ('1', '7', '103', '3')) AND (DateLeft IS NULL) AND (TerritoryID IS NOT NULL) AND (LastName IS NOT NULL) ORDER BY LastName"
FillDropDownList(sql2,TerritoryManager)
if AdjustmentType.SelectedValue = 2 then
DaysCovered.visible=false
DollarAmount.visible=true
Dayscovered.text=""
lblterritories.visible=false
Territories.visible=false
end if
if AdjustmentType.SelectedValue = 1 then
DollarAmount.visible=false
DaysCovered.visible=true
DollarAmount.text=""
lblterritories.visible=true
Territories.visible=true
lblproduct.visible=true
end if
end if
End SubDo you get any kind of error message or anything to help us go by?
The page rendering is done by the Page_Render() method which is the actual method responsible for Rendering the Page to the web browser. Page_Load is only used to load components on the page or creating object.
Figured it out... Now how do i set a paramter for my second SQL.. because strings do not accept parameters and my drop down event handler is
FillDropDownList(sql as string, ddl as dropdownlist)
0 comments:
Post a Comment