I have a page which contains some search parameters and a telerik chart.
At the beginning, the page can be rendered because the chart is invisible, once i click the generate chart button, it run for a long time and finally prompt for username and password, after entering 3 times, it shows me the 401.2 error.
The web application is using 2008 Q3 on IIS 6.
Here is part of my web.config
| <location path="Telerik.Web.UI.WebResource.axd"> |
| <system.web> |
| <authorization> |
| <allow users="*"/> |
| </authorization> |
| </system.web> |
| </location> |
| <location path="ChartImage.axd"> |
| <system.web> |
| <authorization> |
| <allow users="*"/> |
| </authorization> |
| </system.web> |
| </location> |
| ....... |
| <httpHandlers> |
| <remove path="*.asmx" verb="*"/> |
| <add path="*.asmx" verb="*" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/> |
| <add path="*_AppService.axd" verb="*" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/> |
| <add path="ScriptResource.axd" verb="GET,HEAD" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/> |
| <add path="Telerik.RadUploadProgressHandler.ashx" verb="*" type="Telerik.Web.UI.Upload.RadUploadProgressHandler, Telerik.Web.UI"/> |
| <add path="Telerik.Web.UI.DialogHandler.aspx" verb="*" type="Telerik.Web.UI.DialogHandler, Telerik.Web.UI, Culture=neutral, PublicKeyToken=121fae78165ba3d4"/> |
| <add path="Telerik.Web.UI.SpellCheckHandler.axd" verb="*" type="Telerik.Web.UI.SpellCheckHandler, Telerik.Web.UI, Culture=neutral, PublicKeyToken=121fae78165ba3d4"/> |
| <add path="ChartImage.axd" verb="*" type="Telerik.Web.UI.ChartHttpHandler, Telerik.Web.UI, Culture=neutral, PublicKeyToken=121fae78165ba3d4" validate="false"/> |
| <add path="Telerik.Web.UI.WebResource.axd" verb="*" type="Telerik.Web.UI.WebResource, Telerik.Web.UI" validate="false"/> |
| </httpHandlers> |
| <%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default"%> |
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| <html xmlns="http://www.w3.org/1999/xhtml"> |
| <head runat="server"> |
| <title></title> |
| </head> |
| <body> |
| <form id="form1" runat="server"> |
| <div> |
| <iframe src="default2.aspx" width="800" height="600" frameborder="0" style="left: 50px; top: 50px; position: absolute"></iframe> |
| </div> |
| </form> |
| </body> |
| </html> |
| <%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default2.aspx.vb" Inherits="Default2"%> |
| <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> |
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| <html xmlns="http://www.w3.org/1999/xhtml"> |
| <head runat="server"> |
| <title></title> |
| </head> |
| <body> |
| <form id="form1" runat="server"> |
| <telerik:RadScriptManager ID="RadScriptManager1" runat="server"> |
| </telerik:RadScriptManager> |
| <telerik:RadWindowManager ID="RadWindowManager1" runat="server"> |
| <Windows> |
| <telerik:RadWindow ID="RadWindow1" runat="server" NavigateUrl="http://www.google.com" |
| VisibleOnPageLoad="True" Skin="Vista"> |
| </telerik:RadWindow> |
| </Windows> |
| </telerik:RadWindowManager> |
| </form> |
| </body> |
| </html> |

protected
void imgSearch_Click(object sender, EventArgs e)
{
Grd1.EnableLinqExpressions =
false;
string l_filer = string.Empty;
if (!String.IsNullOrEmpty(txtName.Text.Trim()))
l_filer =
"name LIKE '" + txtName.Text.Trim() + "'";
else
l_filer =
"1 = 1 ";
GrdUDF.MasterTableView.FilterExpression =
"(" + l_filer + ")";
GrdUDF.Rebind();
}
Here the problem is, when I give the exact word in the textbox, it will give me the result. but I want to search the records using "Contains". say for example, If I'm giving "D" in textbox, it should show the list of records, that contains "D". if nothing I there, then I've to show all the records in the grid.
I dont know, where I slipped. any help????
thanks in advance,
Prabhu KS
| void grdFinancialPeriods_NeedDataSource(object source, GridNeedDataSourceEventArgs e) |
| { |
| BindGrid(); |
| } |
| private void BindGrid() |
| { |
| int count = 0; |
| FinancialPeriodManagerClient service = new FinancialPeriodManagerClient(); |
| grdFinancialPeriods.MasterTableView.FilterExpression = string.Empty; |
| Prd[] list = service.GetAllFinancialPeriods(out count, grdFinancialPeriods.PageSize, |
| grdFinancialPeriods.MasterTableView.CurrentPageIndex * grdFinancialPeriods.PageSize, |
| (Behsaman.FilterItemList)Session["filterItemList"], |
| (SortItem)Session["SortExpression"]); |
| grdFinancialPeriods.DataSource = list; |
| grdFinancialPeriods.VirtualItemCount = count; |
| grdFinancialPeriods.DataBind(); |
| service.Close(); |
| } |
| public List<Prd> GetAllFinancialPeriods(int maximumRows, int startRowIndex, |
| FilterItemList filterItemList, SortItem sortItem, out int count) |
| { |
| var query = (from prd in Generals.Db.Prds |
| select prd); |
| query = GetFilterQuery(query, filterItemList); |
| query = GetSortQuery(query, sortItem); |
| count = query.Count(); |
| return query.Skip(startRowIndex).Take(maximumRows).ToList().Deserialize<Prd>(); |
| } |