PC Review


Reply
Thread Tools Rate Thread

AutoPostBack Problems

 
 
riley.derrick@gmail.com
Guest
Posts: n/a
 
      18th Aug 2006
To all the ASP.NET 2.0 Gurus, I am having a bit of a problem. Here is
the situation. I have a created a web form that does the following.
Has 2 dropdown lists that are databound to a SQL Datasource. Has 2
calendar controls with 2 dropdowns (month/year) per Calendar. The
calendars are edited/modified so that the user can choose a Month and a
Year for a particular calendar and the calendar control updates and
displays that particular month and year. The user then clicks the date
on the calendar and populates a textbox below. Below that I have a
bunch of other fields reading in data from user input.

Problem: The 2 dropdowns for the calendar controls are formatted like:

<aspropDownList id="drpCalMonth" Runat="Server" AutoPostBack="True"
OnSelectedIndexChanged="Set_Calendar"
cssClass="calTitle"></aspropDownList>

The calendar controls are the only fields that are set, AutoPostBack
='True". All the other fields are not. When I view the page in the
browser (IE) it displays fine. I have no problem with my 2 databound
dropdowns. When I click on a dropdown for one of the Calendar Controls,
(Ex: August --> October), the page refreshs and I get a "The page can
not be displayed" message. If I go into the ASP Page and change all
AutoPostBack="True" --> "False", reload the page and try again, I do
not get any errors, but the calendar doesn't update based on the
dropdowns I have chosen. Any ideas would be great.

Code below:
Page Load Event:

'Sets up Active Directory Security
Dim bIsFranshise As Boolean = IsFranchise()
Dim bIsServices As Boolean = IsServices()

If bIsServices Then
SqlDataSource1.SelectCommand = SqlDataSource1.SelectCommand
& " and [region_code] = '" & myRegion() & "'"
ElseIf bIsFranshise Then
SqlDataSource1.SelectCommand = SqlDataSource1.SelectCommand
& " and [territory] = '" & myTerritory() & "'"
End If
SqlDataSource1.SelectCommand = SqlDataSource1.SelectCommand & "
order by active_customer_log.acct_no "

If bIsFranshise Then
SqlDataSource2.SelectCommand = SqlDataSource2.SelectCommand
& " and [territory] = '" & myTerritory() & "'"
End If
SqlDataSource2.SelectCommand = SqlDataSource2.SelectCommand & "
order by [rank]"

'Hide the title of the calendar control
calStart.ShowTitle = False
calEnd.ShowTitle = False

'Populate month and year dropdown list boxes which
'replace the original calendar title
If Not Page.IsPostBack Then

Call Populate_MonthList()

Call Populate_YearList()
End If

End Sub

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Autopostback =?Utf-8?B?U2hhaHJpYXI=?= Microsoft ASP .NET 1 10th Mar 2006 02:45 PM
problems with AutoPostBack Sean Chapman Microsoft C# .NET 2 23rd Jan 2006 04:43 PM
other than autopostback? Curt_C [MVP] Microsoft ASP .NET 11 10th Jun 2004 01:38 PM
AutoPostBack =?Utf-8?B?U3VuaWw=?= Microsoft ASP .NET 4 9th Jun 2004 08:09 PM
AutoPostBack Mira Vizjak Microsoft ASP .NET 0 14th Jul 2003 10:17 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:44 AM.