Showing posts with label following. Show all posts
Showing posts with label following. Show all posts

Wednesday, March 28, 2012

Postback issue

In my page, there are a lots of toolkit controls and gridvidw. Sometime when I postpack partially inside a UpdatePanel, I got the following message in a popup message box:

Invaid postback or callback argument. Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <% Page EnableEventValidation="true" %> in page. For security purposes,this fuature verifies that arguments to postbalc or callback events originate from the server control that orginally rendered them. If the data is valid and expected, use the ClientScriptManager.RegiterForEventValidation method in order to register the postback or callback data for validation.

For example, in gridview with paging, when I click on page numnber, sometimes the above message will come out. It comes out randomly. If I refresh the page, it will fix this issue.

How to solve this issue?

The pics you posted are not visible.

A potentially dangerous Request.Form value was detected from the client (ctl00$ctl00$ctl00$ctlToAdd1$ctl00$ctlHeaderFooter$ctl00$txtPageHeader="<p>DO NOT ATTEMPT TH...").

Description: Request Validation has detected a potentially dangerous client input value, and processing of the request has been aborted. This value may indicate an attempt to compromise the security of your application, such as a cross-site scripting attack. You can disable request validation by setting validateRequest=false in the Page directive or in the configuration section. However, it is strongly recommended that your application explicitly check all inputs in this case.

Exception Details:System.Web.HttpRequestValidationException: A potentially dangerous Request.Form value was detected from the client (ctl00$ctl00$ctl00$ctlToAdd1$ctl00$ctlHeaderFooter$ctl00$txtPageHeader="<p>DO NOT ATTEMPT TH...").

Source Error:

[No relevant source lines]


Source File:c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\siteseasytest\b32181f7\172c3a32\App_Web_yzjzpobg.2.cs Line:0

Stack Trace:

[HttpRequestValidationException (0x80004005): A potentially dangerous Request.Form value was detected from the client (ctl00$ctl00$ctl00$ctlToAdd1$ctl00$ctlHeaderFooter$ctl00$txtPageHeader="<p>DO NOT ATTEMPT TH...").]

System.Web.HttpRequest.ValidateString(String s, String valueName, String collectionName) +3219550

System.Web.HttpRequest.ValidateNameValueCollection(NameValueCollection nvc, String collectionName) +108

System.Web.HttpRequest.get_Form() +119

System.Web.HttpRequest.get_HasForm() +57

System.Web.UI.Page.GetCollectionBasedOnMethod(Boolean dontReturnNull) +2025201

System.Web.UI.Page.DeterminePostBackMode() +60

System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +6953

System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +154

System.Web.UI.Page.ProcessRequest() +86

System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +18

System.Web.UI.Page.ProcessRequest(HttpContext context) +49

ASP.communitydefault_aspx.ProcessRequest(HttpContext context) in c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\siteseasytest\b32181f7\172c3a32\App_Web_yzjzpobg.2.cs:0

System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +154

System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64


Jason, If you are using code behind to control what gets added to a PlaceHolder for instance...

In ATLAS - we simply issued the

UpdatePanelModal.Update();

Because viewstate would get mucked up. (Article on my blog about this)

In Beta - I find that anytime you issue that command - it causes the error ... I think when mode is conditional - it works but not sure - as I am being forced to use always due to databound controls dissapearing on a modal popup and have not heard any feedback on the issue...

If you are not using code behind to handle - can you post a simple code example that demonstrates the issue?


Jason, I have written down the message text in message box. Forget the pic.


jodywbcb, what's your post for my question?

Posting from Tab Control does not work

Hi all,

I am new to AJAXtoolkit and I tried the following code it runs fine but does not input values in textbox nor updates the image

<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
<script type="text/javascript">
function PanelClick(sender, e) {
}

function ActiveTabChanged(sender, e) {
__doPostBack('<%= Tabs.ClientID %>', sender.get_activeTab().get_headerText());
}
</script>
<div>
<ajaxToolkit:TabContainer runat="server" ID="Tabs" Height="150px"
OnClientActiveTabChanged="ActiveTabChanged"
OnActiveTabChanged="ActiveTabChangedServer">
<ajaxToolkit:TabPanel runat="Server" ID="Panel1" HeaderText="Tab One">
<ContentTemplate>
PAGE ONE - Sample HTML Content for Tab
</ContentTemplate>
</ajaxToolkit:TabPanel>
<ajaxToolkit:TabPanel runat="Server" ID="Panel2" HeaderText="Tab Two" >
<ContentTemplate>
PAGE TWO - Sample HTML Content for Tab
</ContentTemplate>
</ajaxToolkit:TabPanel>

<ajaxToolkit:TabPanel runat="Server" ID="Panel3" OnClientClick="PanelClick" HeaderText="Tab Three">
<ContentTemplate>
PAGE THREE - Sample HTML Content for Tab
</ContentTemplate>
</ajaxToolkit:TabPanel>
</ajaxToolkit:TabContainer> <br />
<asp:Image ID="Image1" runat="server" />
<asp:TextBox ID="txtTabSelect" runat="server" />
</div>
</form>

in the code behind I have this:

protected void Page_Load(object sender, EventArgs e)
{
ScriptManager1.RegisterAsyncPostBackControl(Tabs);
}

protected void ActiveTabChangedServer(object sender, EventArgs e)
{
if (Tabs.ActiveTab == Panel1)
{
Image1.ImageUrl = "~/Images/HomeEnabled.jpg";
txtTabSelect.Text = "Selected Panel 1";

}

if (Tabs.ActiveTab == Panel2)
{
Image1.ImageUrl = "~/Images/ProductsEnabled.jpg";
txtTabSelect.Text = "Selected Panel 2";
}

if (Tabs.ActiveTab == Panel3)
{
Image1.ImageUrl = "~/Images/SupportEnabled.jpg";
txtTabSelect.Text = "Selected Panel 3";
}

}

Please do tell me what am I doing wrong. I tried debugging, the watch shows that the values are present but do display.
Thanks,

do you have the autopostback property on the tabs container set to true?


Hi,

ajaxToolkit:TabContainer does not have the property and I did try adding AutoPostBack="true", compiled it and ran but it still does not work. what baffles me is it calls the

protected void ActiveTabChangedServer(object sender, EventArgs e)
{
.....

}

on the server and I can see the values in the watch window but when the page reloads, the values are not there

I have this in the page load event

if (!Page.IsPostBack)
{
ScriptManager1.RegisterAsyncPostBackControl(Tabs);
}

Thanks,


Hi,

It's caused by not calling __dopostback method in a correct way. I suggest using a hidden button to trigger postback. Here is a sample:

<%@. Page Language="C#" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><script runat="server">protected void Page_Load(object sender, EventArgs e) { //ScriptManager1.RegisterAsyncPostBackControl(Tabs); } protected void ActiveTabChangedServer(object sender, EventArgs e) { if (Tabs.ActiveTab == Panel1) { Image1.ImageUrl = "~/Images/HomeEnabled.jpg"; txtTabSelect.Text = "Selected Panel 1"; } if (Tabs.ActiveTab == Panel2) { Image1.ImageUrl = "~/Images/ProductsEnabled.jpg"; txtTabSelect.Text = "Selected Panel 2"; } if (Tabs.ActiveTab == Panel3) { Image1.ImageUrl = "~/Images/SupportEnabled.jpg"; txtTabSelect.Text = "Selected Panel 3"; } //Response.Write(DateTime.Now.ToString()); } </script><html xmlns="http://www.w3.org/1999/xhtml" ><head id="Head1" runat="server"> <title>Untitled Page</title></head><body> <form id="form1" runat="server"> <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager> <script type="text/javascript"> function PanelClick(sender, e) { } function ActiveTabChanged(sender, e) { $get("<%= Button1.ClientID%>").click();// __doPostBack('<%= Tabs.ClientID%>', sender.get_activeTab().get_headerText()); } </script> <div><asp:Button runat="server" style="display:none;" Text="Button" ID="Button1"></asp:Button> <ajaxToolkit:TabContainer runat="server" ID="Tabs" Height="150px" OnClientActiveTabChanged="ActiveTabChanged" OnActiveTabChanged="ActiveTabChangedServer"> <ajaxToolkit:TabPanel runat="Server" ID="Panel1" HeaderText="Tab One"> <ContentTemplate> PAGE ONE - Sample HTML Content for Tab </ContentTemplate> </ajaxToolkit:TabPanel> <ajaxToolkit:TabPanel runat="Server" ID="Panel2" HeaderText="Tab Two" > <ContentTemplate> PAGE TWO - Sample HTML Content for Tab </ContentTemplate> </ajaxToolkit:TabPanel> <ajaxToolkit:TabPanel runat="Server" ID="Panel3" OnClientClick="PanelClick" HeaderText="Tab Three"> <ContentTemplate> PAGE THREE - Sample HTML Content for Tab </ContentTemplate> </ajaxToolkit:TabPanel> </ajaxToolkit:TabContainer> <br /> <asp:Image ID="Image1" runat="server" /> <asp:TextBox ID="txtTabSelect" runat="server" /> </div> </form></body></html>

Hi Raymond Wen,

I tried your approach too.. but the error occurs again.

It gives me "Microsoft JScript runtime error: 'this.get_element().style' is null or not an object". I dont know what it is and why does it occur as I have not written this piece of code.

upon using a debugger it shows as this "this.get_element().style.visibility = 'visible';" which is present in the

_app_onload funtion like this:

_app_onload : function(sender, e)
{

.... this.get_element().style.visibility = 'visible';

}

Thanks for you help,
Stephen


Can you create a simple page to reproduce it?

Monday, March 26, 2012

PRM_ParseErrorDetails null or not an object.

I'm getting the following javascript error in my page whenver i try to use an UpdatePanel:

"Sys.WebForms.Res.PRM_ParseErrorDetails is null or not an object."

I have the RC1 dll in my bin folder, all the relevant entries in my web.config, and this worked fine before, but suddenly it's gone kaput!

Any help would be great.

Can you repro this error again? Try to post some codes?to?repro?this?error here.
Try to debug javascript error according to the following steps.
Steps:
1.Create a file based web site
2.Add a JavaScript file called MyScript.js to the root of the project
In this file, add the following:
function MyCustomFunction()
{
//doing custom work
alert("MyCustomFunction ran!!!");
}
if (typeof('Sys') !== 'undefined') Sys.Application.notifyScriptLoaded();
3.Add an ASPX page to the application
4.Add a ScriptManager to the page and add the above script the Scripts collection
<asp:ScriptManager ID="ScriptManager1" runat="server">
<Scripts>
<asp:ScriptReference Path="~/MyScript.js" />
</Scripts>
</asp:ScriptManager>
5.Ensure that the Disable Script Debugging options are unchecked in Internet Explorer's Advanced Properties.
6.Set a breakpoint on the alert("MyCustomFunction ran!!!"); line in the MyScript.js file
7.Ensure that Internet Explorer is configured for debugging using information from this lesson
8.Press F5 to start debugging.
Does the breakpoint get hit?
Which processes does Visual Studio attach to? (hint: check Debug | Attach to Process..)
9.Add the following HTML to the <body> of the ASPX page:
<input type="button" value="Call Function" onclick="MyCustomFunction()" />
10.Press F5 to start debugging.
Does the breakpoint get hit?
Which processes does Visual Studio attach to? (hint: check Debug | Attach to Process..)
11.Add each item listed below after the alert(); in MyCustomFunction() one at a time and Press F5 to debug the page. i.e. Add item "a" from the list, press F5. Remove item a and add item "b" and repeat. Answer the following:
Does the breakpoint get hit?
Which processes does Visual Studio attach to? (hint: check Debug | Attach to Process..)
a.debug.assert(false, "That wasn't supposed to happen!", true);
b.debug.fail("Did I break?");
c.debug._traceDump(Sys.Application, 'object name', true, '... ');
d.debug.trace("Is this a trace or what?");
12.While you're attached to the iexplore.exe process, take a look at the Script Explorer (Debug menu, Windows, Script Explorer).

Wish the above can help you.

Saturday, March 24, 2012

Problem based on following "Scotts todo list" guidelines

Hello

Since I started using ajax I based all my web programming on "Scott's todo list" Video.

That means everything I do is AJAX, CSS and most important of all, ObjectDataSource based. Everything went fine until I decide to use great amounts of data. For example I have now a single table on sql 2005 database with a couple of indexes, the table have more tha 4 million records and growing up, the database runs on a 2 x dual xeon processors, 4GB ram and 10.000 rpm seagate scsi hdd. (I described the machine just for you understand that the problem i'm going to talk is not a preformance problem)

Tha HDD keeps unfragmeted the most of time. But there are much information and the query I did takes more than 30 seconds (I want to call the attention that my query really needs to take more than 30seconds, that's a fact and no matter why). To understand this, when I execute the query the CPU load not pass from 5% to 8%. So I think it is because no matter how fast the hdd is, it is slow to return the data.

From time to time, the user changes parameters in the web page, like incremeting the data range, include specific record types or specific clients, vendors and so incrementing the amount of records to be returned

When it is needed to return much rows, (it is unspecifically the amount of records to be returned,) it takes more than 30 seconds. so from time to time I get the "The timeout period elapsed prior to completion of the operation" error and just at 30 seconds the query stops and I have no results.

Looking for a solution on the internet I conclude the following:

1. It is a very very common error in web sites using .aspx

2. In my case, I do not know others, I use OBJECTDATASOURCE, as indicated on Scott's ToDo List, (where I CAN NOT define a timeout parameter for the database connection), instead of SQLDATASOURCE (where one can define a CommandTimeout parameter)

So How can I extend the TimeOut parameter when I use ObjectDataSource?

As explained above, I do not want answers like, "you need to improve your sql database, make tunning, or such common answers". What I really want to know is HOW TO CHANGE THE TIMEOUT parameter for the ObjectDataSource. That's all. Because there are times when you need to execute systems procedures using for example xp_shell, or whatever that makes your query take more than 30 seconds.

It is possible, Or I need to switch to SqlDataSource?

By the way I changed the timeout value on the web.config at the connection string, but no matter which value I put it always stops at 30 seconds.

Helcjo

Firstly, I'm surprised that you are taking 30+ seconds to run a query!! I know you said you don't want answers like this... and I'm sorry.. but... this sounds huge to me! There have GOT to be ways to reduce this time down.

Secondly, on to what you really want to know... how to set the timeout. Well... you're using an objectdatasource... which simply calls whatever method you specify to return your results. So it sounds like that method must create a SqlConnection then a SqlCommand and execute something. Can you not change the way that this connection behaves so as not to timeout so quickly?


Hello

I guess you will understand better my problem if you see and follow the steps indicated in "SCOTT'S TODO LIST" sample. As you can see, he just drag and drop the objectdatasource to the web page and connects it to the dataset he previously added to the project.

Now imagine millions of records in his sample, in only one table, but with more fields than the Scott's sample.

For your understanding, on why can take more than 30secs a query to be returned, imagine using xp_cmdshell to perform several tasks that take some minutes to be completed. So not necesarily you need to expect for data records from your database.

I'm not sure about what you are saying in the phrase: "Can you not change the way that this connection behaves so as not to timeout so quickly?", could you please explain me


Hello

I mentioned on my post, that after some research on the internet, I found this was a very common problem for aspx. web pages, and if anyone of you try to look in google, yahoo, msn search, etc. then search this error message

"The timeout period elapsed prior to completion of the operation"

, so you will find several amounts of websites with this error. I guess there are several databases which takes more than 30 secs to respond.


Hello Again

I still have exactly the same problem. Just to be known, I used SQL Express 2005 and after no help on this subject, I tried MySQL, added several indexes for the table, just doing what you indicate: looking on how to improve the query, even more added 8GB to the dual xeon machine, but nothing, that's a fact all the queries run much faster, but not yet to outperform the 30secs barrier.

Of course not all the queries take more than 30 secs. So I'm going to ilustrate my problem using real queries:

For example:

select ip, sum(cltbytes), sum(srvbytes), count(*) from log WHERE ip like '192%' and date >= '20070901' and date <= '20070901'' GROUP BY IP, ORDER BY IP

this real simple query which represents only ONE day data, takes no more than 2 secs resulting from almost 1 million records in just like 50 rows (50 different ips)

As you can see my table have only 5 columns: ip varchar(16), date datetime, cltbytes int, srvbytes int, host varchar(72) and I have an index by IP and other by date

I can not imagine how to make more indexes in order to improve the results, also I can noit imagine how to make a better query that he above one.

The problem starts when I increase the date range, for example:

select ip, sum(cltbytes), sum(srvbytes), count(*) from log WHERE ip like '192%' and date >= '20070901' and date <= '20070916'' GROUP BY IP, ORDER BY IP

as you can see it should obtain data from 15 days, as we can get a sum from almost 15 million records, this query takes more than 25 seconds, but still works because is under the 30 secs barrier.

Of course to get the results for more than 16 days It'S IMPOSSIBLE.

Why it takes more than 30 secs, in two diffrerent databases, ms-sql express 2005 and mysql, I do not know, but I have some idea: The server's HARD DISK can not handle so much data in a more eficient way if you are saving almost a million records per day, Of course I have a fast and powerful hdd a seagate cheetah 73GB 15000 RPM using SCSI 320 , if you know more fastest HDDs I would like to know them.

I would like to see you trying such table in you machine with just 15 million records and running the above query in order to know if the problems is my machine, or my vs2005 or my iis6 or my win 2003. in fact exactly the same problem happens in my develpment machine and in the production server.

A week ago I found wht seems the solution to my problem, an article from your website:http://www.asp.net/learn/data-access/tutorial-72-cs.aspx I followed the instructions, and yes, finally some light at the end of the tunnel, I can now change the CommandTimeOut, BUT it doesn't work with the simple Scott's ToDo List Example.

In order to make it work, I need to manually programmatically type the code, but I do not want to do that. I REALLY WANT THE SCOTT'S TODO sample working with my table. But now, at last, I know where the problem is. the problem is at the autogenerated code for the dataset when adding datasets at the app_code folder in my application.

So, I have now another idea, how can I hack vs2005 in order to change the default timeout value of 30 seconds when it generates on the fly code for the DATASET? and why somebody at microsft decided that 30 secs is enough for all the cases instead of leaving it forever or at least let the user pass the parameter when issuing the databind() for the ObjectDataSource?

thanks

Helcjo

Problem calling Web Service using the DynamicPopulate Extender - Web Service Call Fails: 5

Hi, I'm quite new to ASP.Net AJAX so please forgive my ignorance.

I have downloaded and installed the RC1 version and am following through some of the tutorial videos.

I am having a problem with the Dynamic Populate Extender example. I have created some asp controls with onclick events calling a javascript function. From there I am attempting to use a dynamic populate extender control to call a web service - it's a function declared on that ASPX page as the tutorial explains in necessary and decorated with the System.Web.Services.WebMEthod AND System.Web.Script.Services.ScriptMethod attributes.

Everything works as expected until I attempt to pass a parameter to the web services - in fact until I declare the web service function with a parameter. Once I do this, all that is returned to (or at least all that displays in) the control linked to the DynamicPopulateExtender is "Web Service Call Failed: 500".

Can anyone possibly put me on the right track here? (or would I need to post some code examples?)

Thanks in Advance.

Stu.

the tutorial is in beta version.

i will post my code for you

ASPX page

<%@. Page Language="C#" AutoEventWireup="true" Codebehind="Default.aspx.cs" Inherits="DynamicPopulateDemo._Default" %>

<%@. Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>


<!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>Untitled Page</title>

</head>
<body>

<form id="form1" runat="server">
<script type="text/javascript">

function updateDateKey(value) {

var behavior = $find('dpe');

if (behavior) {
behavior.populate(value);
}

}

Sys.Application.add_load(function(){updateDateKey('G');});
</script>

<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<cc1:DynamicPopulateExtender ID="dpe" runat="server" ClearContentsDuringUpdate="true"
PopulateTriggerControlID="Label1" TargetControlID="pan" ServiceMethod="GetHtml">
</cc1:DynamicPopulateExtender>

<p>
<asp:Label ID="Label1" runat="server" Text="Label" CssClass="subheading">Time at the server:</asp:Label>
</p>
Choose a date/time format:<p>
<label for="r0"><input type="radio" name="rbFormat" id="Radio1" value='G' onclick="updateDateKey(this.value);" checked="checked" />Normal</label><br />
<label for="r1"><input type="radio" name="rbFormat" id="Radio2" value='d' onclick="updateDateKey(this.value);" />Short Date</label><br />
<label for="r2"><input type="radio" name="rbFormat" id="Radio3" value='D' onclick="updateDateKey(this.value);" />Long Date</label><br />
<label for="r3"><input type="radio" name="rbFormat" id="Radio4" value='U' onclick="updateDateKey(this.value);" />UTC Date/Time</label><br />
</p>
<br />
<p>

This time is dynamically formatted and<br /> returned as HTML from the server:

<asp:Panel ID="pan" runat="server" BorderColor="#404040" BorderStyle="Solid" BorderWidth="1px" Height="15px" HorizontalAlign="Center" Width="380px">
</asp:Panel>
</p>

</form>


</body>

</html>

ASPX.CS

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

namespace DynamicPopulateDemo
{
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{

}
[System.Web.Script.Services.ScriptMethod]
[System.Web.Services.WebMethod()]
public static string GetHtml(string contextKey)
{
System.Threading.Thread.Sleep(250);
string value = string.Empty;

if (contextKey == "U")
{
value = DateTime.UtcNow.ToString();
}
else
{
value = String.Format("{0:" + contextKey + "}", DateTime.Now);
}
return String.Format("<span style='font-family:courier new;font-weight:bold;'>{0}</span>", value);


}
}
}


Thankyou very much for posting this code.

I have worked through the differences between your version of the tutorial and the code I was trying to get running. It all boiled down to the name of the parameter on the web service method. I don't understand this yet but if I call the parameter on my web service method, "contextKey" it works, if I call it anything else, it fails.

Is anyone able to shed some light on this for me?


In the documentation it states that the paramater must be astring namedcontextKey

[WebMethod]string DynamicPopulateMethod(string contextKey) { ... }

Note you can replace "DynamicPopulateMethod" with a naming of your choice, but thereturn type and parameter name and type must exactly match, including case.

Wednesday, March 21, 2012

Problem In Deploy

Hello,

Whenever I try to deploy and Run an ATLAS web I get following error in Web.config File...

Parse Error Message: unrecognized attribute 'type'

Line 15 : <sectionGroup name="microsoft.web" type = "Microsoft.web.configuration.MicrosoftWebSectionGroup">

I tried to create Website in Both FileFormat and HTTP. In both method I get the Same Error Message.

Have you checked whether the ASP.NET version of your web application is set to 2.0? You would get this message if your application is set to use ASP.NET 1.x, because the type attribute did not exist on the sectionGroup element in v1.x.

Thanks,


Hi,

It works...
I have just changed the version and Application Pool to ASP.NET 2.0.

It works Nice...

Thank u...

problem in returning DataTable

Hello Guys,

i am calling a ajax call to page method which returns DataTable. but i got following error

"The server method 'GetInfo" failed with the following error: System.InvalidOperationException-- A circular reference was detected while serializing an object of type 'System.Reflection.Module' "

does ajax support serializing datatable?

Thanks,

Kiran

Hi,kalvagadda

The Latest version of Ajax Does not have the support of DataTable and DataSet.

You can check these links for answer and more info:

http://forums.asp.net/t/1121145.aspx

http://forums.asp.net/t/1119899.aspx

http://forums.asp.net/t/1122022.aspx

http://dotnetslackers.com/articles/ajax/ASPNETAjaxGridAndPager.aspx

Let me know if you need more info.

Hope this helps.

Thanks!


Hi,

Thanks for the reply. Links were helpful.

Thanks,

Kiran


ThanksJin-Yu Yin - MSFTfor providing more info

Problem installing the documentation

When I build the website for the documentation I get the following errors:

Error 37 Unknown server tag 'Samples:ClientVerification'. C:\AJAX Documentation\Samples\LocalizingClientResourcesWalkthrough\cs\Default.aspx 40


Error 36 Could not load file or assembly 'LocalizingScriptResources' or one of its dependencies. The system cannot find the file specified. C:\AJAX Documentation\Samples\LocalizingClientResourcesWalkthrough\cs\Default.aspx 2

I followed the instructions in the readme.txt file and the files are unzipped into the C:\AJAX Documentation folder.

bump

problem of find control in nested Formview control

I can find my Textbox contols in following structures,

<asp:PanelID="Popup1"runat="server"CssClass="popup"style="display:none;">

<asp:UpdateProgressid="UpdateMessagesProgress"DynamicLayout="false"runat="server"DisplayAfter="0">

<ProgressTemplate>

Processing...

</ProgressTemplate>

</asp:UpdateProgress>

<asp:UpdatePanelID="UpdatePopup"runat="server"UpdateMode=Always>

<ContentTemplate>

<asp:FormViewid="FormView1"runat="server" DefaultMode="Edit">

<EditItemTemplate>

<asp:TextBoxid="title_TextBox"runat="server" Text='<%# Bind("title") %>'></asp:TextBox>

............

</EditItemTemplate>

</asp:FormView>

</ContentTemplate>

</asp:UpdatePanel>

</asp:Panel>

I want to set the textbox's visible to false but can't find it. Please help me!!

Check out

http://forums.asp.net/t/1107107.aspx it may help you


Try this one :

FormView1.FindControl('title_TextBox').Visible = false


I still can't solve this problem. Any other ideas?


Finally, I can find my Textbox control by using following method:

In RowUpdating envent:

protected void GridView2_RowUpdating(object sender, GridViewUpdateEventArgs e)
{
GridViewRow MyRow = GridView2.Rows[e.RowIndex];

if (MyRow != null)
{
TextBox exit_price_text = MyRow .FindControl("exit_price_TextBox") as TextBox;
.....

}

}