Roadblocks utilizing ASP.NET 3.5 and ASP.NET AJAX

Below is a listing of known bugs of the ASP.NET 3.5 and ASP.NET AJAX and the resolution.

Calendar control extender

http://forums.asp.net/p/1110311/2780472.aspx#2780472

Problem: Calendar extender would show random transparent weird popup upon clicking. (unbelievable that this can pass QA in the first place)
Resolution: Add a dummy CalendarExtender outside of updatepanel. The calendarextender might need to associate with a dummy invisible textbox and invisble image button too.

-----------------------------------------------------------

ASP.NET AJAX CalenderExtender again, this time on the days cells being blocked.

Problem: If you have a couple of CalenderExtender in your page and asking UI designer to design the CSS separately. You would be very likely getting this. The problem is the td, tr and div tag being overridden by the CSS .

Resolution: Have a more specific CSS for your calendarextender. The rule of CSS is the most specific one prevail.Use this (MyCalendar) in the CssClass attribute of the calenderextender.Adjust the width and height to suit. However, there is another problem follows using this method. When you select month, you would see some misalignment, same goes to years.


/*fixed ajax calendar issue*/
/*Calendar*/
.MyCalendar .ajax__calendar_container {

border:1px solid #646464;
background-color: white;

color: black;
width:230px;
height:200px;
}

.MyCalendar .ajax__calendar_body{width:100%;height:200px;
}

.MyCalendar .ajax__calendar_other .ajax__calendar_day,
.MyCalendar .ajax__calendar_other .ajax__calendar_year {

color: black;

}

.MyCalendar .ajax__calendar_hover .ajax__calendar_day,

.MyCalendar .ajax__calendar_hover .ajax__calendar_month,
.MyCalendar .ajax__calendar_hover .ajax__calendar_year {

color: black;

}

.MyCalendar .ajax__calendar_active .ajax__calendar_day,

.MyCalendar .ajax__calendar_active .ajax__calendar_month,
.MyCalendar .ajax__calendar_active .ajax__calendar_year {

color: black;

font-weight:bold;

}

-------------------------------------------------

ASP.NET 3.5 ListView with DropDownList in InsertItemTemplate

http://forums.asp.net/t/1187425.aspx
Problem: When you try to bind a dropdownlist in the listivew. You get
Error "Databinding methods such as Eval(), XPath(), and Bind() can only be used in the context of a databound control".
Resolution: Handle OnItemInserting of the ASP.NET 3.5 ListView. To contruct object to be inserted manually.

----------------------------------------------------


SSRS ReportViewer in ASP.NET AJAX UpdatePanel

Problem: So, you want to have those fancy AJAX updatepanel behavior on the dropdownlist to choose your report in reportviewer. You diligently code the way up your controls so then it is ready to load the report. However, when you about to roll in the report. Strange things happen. It is not working all and the browser throwing all sort of javascript that you have no idea what it is about. You must be wonder could be browser compatibility issue but the more browser you more, the different errors you get.

Resolution (so-called):

From - http://forums.asp.net/p/1044194/1460759.aspx
ReportViewer.AsyncRendering="false", can anyone help me solve script error? This is my current code base on Yarick's:

protected void Page_PreRenderComplete(object sender, EventArgs e)
{
ListDictionary scripts = ClientScript.GetType().GetField("_registeredClientScriptBlocks", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(ClientScript) as ListDictionary;

foreach (object key in scripts.Keys)
{
Type type = key.GetType().GetField("_type", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(key) as Type;
if (type.Namespace.StartsWith("Microsoft.Reporting.WebForms"))
{
string registeredKey = key.GetType().GetField("_key", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(key) as string;
ToolkitScriptManager.RegisterClientScriptBlock(Page, type, registeredKey, scripts[key] as string, true);
}
}

However, this is not working. Only working if your report view does not need to scroll. What kind of page does not need to scroll. Absurd.


However, found someone posting in stackoverflow that new version of library would solve it. Just give it a shot if you are desperate for solution. For me, i would prefer stay safe by not using any updatepanel at all if i have reportviewer in the page. Your reportviewer would not work even it is outside of updatepanel.


Microsoft Report Viewer 2010 Redistributable Package from :

http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=a941c6b2-64dd-4d03-9ca7-4017a0d164fd



----------------------------------------

ASP.NET listview - record running number

Problem: Would like to have the asp.net ListView to have a automatic running number of the records. Thinking just a few simple settings and thats it. However, no luck.

Resolution: Handle ListView ItemDataBound event

To have codes like this in the handler where LblNo is your control name in the column of the listview

Label LblNumber = e.Item.FindControl("LblNo") as Label;
ListViewDataItem dataItem = (ListViewDataItem)e.Item;
if (LblNumber != null)
{
LblNumber.Text = (dataItem.DataItemIndex + 1).ToString();
}

-------------------------------------------

ASP.NET Menu incompatibility in IE7 and IE8.


Problem: In IE 7, the asp.net menu looks fine, however when you open it in IE8. Disaster. Menu item turn into blank white spaces.

Resolution:

http://blogs.msdn.com/giorgio/archive/2009/02/01/asp-net-menu-and-ie8-rendering-white-issue.aspx


Just overwrite the z-index

.IE8Fix
{
z-index: 100;
}

(however, i notice there is a side effect doing this. It would interfere the ASP.NET AJAX modalpopup where the z-index overlap the modalpopup. ) Probably can try other methods pointed in the website.


-----------------------------------------


Believe me, some of these bugs/inconveniences have wasted few hours of mine trying to figure what was wrong.
(this list would grow from time to time)

Comments

Popular posts from this blog

Outlook : "operation failed, object could not be found. " when trying to close a PST.

Troubleshooting Outlook Express (IMAP, POP3, HTTP, NEWS) with the log file

MSSQL GROUP_CONCAT