Calls To Successive Calls On Repeater With XML Datasource Is Not Binding New Data?
Feb 17, 2010
I have the following Page_Load function...
protected void Page_Load(object sender, EventArgs e)
{
XmlDataSource1.Data = GetXmlFromFile(Request.QueryString["file"]);
XmlDataSource1.DataBind();
Repeater1.DataBind();
}
The page in which this Page_Load resides is called by a parent page. Each time this Page_Load gets called the value of "file" in the query string will be different. So each time I will be receiving the XML contents from a different file which are inserted into the XmlDataSource and then bound against by the Repeater. Getting the XML data from the file works great but when I bind against the repeater that only works the first time through Page_Load. Each time after that when this code is executed the same results from the first XML file are displayed in the repeater.
What am I missing here. How can I get the XML data to be bound against the repeater on each page load instead of just the first one?
View 3 Replies
Similar Messages:
May 10, 2010
I have a webservice (ASP.NET) deployed on a webfarm. A client application consumes it on daily basis. The problem is that some of its calls are duplicated (with difference of milliseconds). For example I have a function Foo(string a,string b). The client app calls this webmethod as Foo('test1','test2') once but my log shows that it is being called twice or sometimes 3 or 4 times randomly. Is this anything wrong with the webfarm or the code? Note that the webmethod has simple straighfarward insert and update statements.
View 1 Replies
Feb 8, 2010
I am creating a simple function that loops through a database, grabs all the tables and (for now) just spits out the first column name. The query I am using is very quick and simple and takes about 1 second to excecute in SQL, I have double and tripple checked this time. However, when my app makes the call, I keep getting a timeout error on about 25% of my calls, none of them should take over 2 seconds...let alone the entire timeout period, and I have no idea why.The section of code that errors out is inside the loop through all the table names (sqldr is the datareader and "name" will get me the name of the table)
[code]...
View 1 Replies
Jul 6, 2010
In my application at some places we have used ObjectDataSource and at other normal method calls to retrieve data.My question is then what exactly are the benefits of using ObjectDataSource ?In the example below "CODE ONE" makes a call to the Business Layer and then Binds the results to the Grid abd "CODE TWO" is using ObjectDataSource to do the same.Then how is ObjectDataSource better?
SuitableApplicant sa = new SuitableApplicant();
IList<HD.Recruitment.SuitableApplicant> list = new List<HD.Recruitment.SuitableApplicant>();
list = HS.Recruitment.RecruitmentService.GetSuitableAppls();
GridView1.DataSource = list;
[code]....
View 5 Replies
Mar 17, 2010
I have a IHttpHandler that acts as a source to a jQuery Autocomplete input field. In the constructor of the handler I generate an index that remains fairly static between request (needs to be rebuilt maybe once a day).How can I cache the the index between calls? Debugging indicates that the constructor is called for each request. I've set IsReusable to "false".
View 2 Replies
Sep 23, 2010
how many times itemDataBound event calls exactly, if my datatable have 2 records it is calling 4 times , first time in item index 0 , second time it is 1 and third time again it contains index 0 and forth time it is 1. so, could anyone please help me how the itemdatabound event actually works,
View 5 Replies
Oct 26, 2010
If I have a 2 control load events and one page load event subs and the control1_Load events fires first, can I lookup some database things and persist them? I would like to use the persisted data in the other two events when they fire. Normally I've been using session variables , is there a better way?
View 3 Replies
Feb 18, 2010
I have a SOAP web service and I'm trying to figure how to save/log the last 10 requests for each user. Each user is required to send their user/pass in each request, so it's easy to know who the request originated from. With these last 10 requests saved, my goal is to develop some sort of page that will allow them to log-in with their credentials and view the raw request, the actual SOAP message, http header information, and anything relevant that I can think of.
The point is to allow people to troubleshoot their own connection issues instead of having to contact me each time they can't connect, have trouble formatting their request, etc....
My first thought was to store all this information in memory in a hashtable or something, but that may have scalability issues when we have hundreds/thousands of users hitting the web service.
We could use our database to store these requests. Instead of hitting the database each time, I may need to create some "buffer" mechanism that will only update the database after the buffer gets to a certain number of requests. Is there an existing library or mechanism that will do this?
We can't store these requests on the file system on the machine hosting the web service. Since these requests can potentially contain sensitive information, it's a business decision that I'll need to work around. Or maybe there's a better way to achieve what I'm trying to do?
View 2 Replies
Jul 29, 2010
Are web service calls synchronous or asynchronous by default? How is synchronicity determined, by the service or by the client?
I have code similar to the following:
try
{
string result = MakeWebServiceCall_1(); // this is a third party webservice
[code]....
In the above, SetStatus is writing to the same tables that the third party web services read from. If I change the status before both web service calls have completed, it's going to make a big mess and I'm going to get fired. How do I know/ensure that the webservice calls are synchronous?
View 1 Replies
Feb 24, 2010
I have an ASP page, which on load fires a bunch of AJAX calls. How can I detect in javascript that all AJAX calls finished? The ajax calls are made using AJAXPRO library. I need this in order to execute some event.
View 1 Replies
Nov 12, 2011
I've got a web app running with purely web services like these:
Code:
<WebMethod()> _
<ScriptMethod(ResponseFormat:=ResponseFormat.Json, UseHttpGet:=False)> _
Public Function EditService(ByVal toddtype As String _
, ByVal fromddtype As String _
[Code] ....
And I want to log each web service call. I don't want to bother my database with this log - I would prefer to have the web app log to a text file on the web server itself.
How would I open and access a log file like this from a bunch of web services? Does web app still have application startup like events???
View 1 Replies
Aug 25, 2010
How do you make SMO release it's connections?
I have this code:
[Code]....
For every call I make to this index method a connection is spun up - and is not released again.
So after 20 calls to the page, I have 20 of the connections awaiting command. This eventually ends up with an exception, when I cannot make new connections, because the connection pool is full.
What do I need to avoid this happening? I cannot seem to find a method on the SMO Server object like Dispose, close or similar.
View 1 Replies
Mar 15, 2010
Can I call a PageMethod and then call another PageMethod before the first has finished? Are concurrent calls to PageMethods allowed?
View 1 Replies
Mar 31, 2011
Are there any transactions around multiple webservice calls.Let me start with a commonly used example -- the travel agency. A customer intends to create a travel plan through an online travel agency. To do this, the online travel application calls the following three Web services:
-Air ticket booking
-Hotel reservation
-Taxi reservation
These three services are available from three separate vendors. If any one of these three services fails, the customer does not wish to proceed with the transaction (again, either all three services must succeed or none at all).My language programming is Asp.net c#.
View 1 Replies
Apr 4, 2011
Are there any transactions around multiple webservice calls?but in ASP.net forum I got the answer below:
http://jalpesh.blogspot.com/2010/05/using-transactions-with-linq-to-sql.html it's offering system.transaction.
View 2 Replies
Dec 1, 2010
I have data that is stored on a local machine and periodically replicated using webservices. This data is critical to the application of this program and is along the lines of business transactions.
TransactionHeader JOIN TransactionDetail
So forth.
Should I be using some type of CRC checking when sending the data to the webservice or is this handled by the TCP protocol itself sufficiently?
EDIT: Just to be clear the data isnt deleted from the client until the server acknowledges receipt and I use strongly typed parameters in my webservice but I am more thinking about "mangled" data (although in all cases but string it should theoretically fail datatype casting).
View 1 Replies
Mar 18, 2011
When I am updating a record with linq to sql my DeleteLesson() method is getting called multiple times.My controller looks like this :
public ActionResult Delete(int id)
{
deleteLesson(id);[code]....
EDIT.also if I use confirm = "Do you want to delete" in ajax options I will have to click okay three times.
View 1 Replies
May 4, 2010
as the behaviour of the UpdateModel<T> changed in MVC 2 (RTM)? Since then I have the following problem when UpdateModel is called:UpdateModel<T1>(record, properties);record is typeof(Jumbo.Juist.Models.Bezorging) and properties is a string[] containing "Winkelnummer" and "OudRoutenummer".This now fails, because a get-property is being accessed: BerekendeAankomstTijd. In the past, it didn't fail. IMHO, this validation should be skipped, because it's only a getter (and thus/also not included in the string[] of properties to update)
View 14 Replies
Jan 13, 2011
I am having an aspx page in which I am calling a user control. The user control I am using a pop up to display it when a user clicks a asp:linkbutton. In that user control I am having a textbox and I am calling a Jquery Blur to do some validation. While doing so the function is calling [blur] is calling twice. I just called an alert() with the textbox value.So I can see the alert is coming twice .What I need to do to avoid the second time. I need to do it only whenever the user going out of the textbox and that also one time.
$('#<%=txtCategory.ClientID %>').blur(function() {
alert($(this).val());
});
View 2 Replies
Jul 27, 2010
I'm using Telerik RadControls, in my codebehind I have the following function, a portion of which adds buttons to the footer.
Protected Sub RadGrid1_ItemCreated(ByVal sender As Object, ByVal e As GridItemEventArgs)
If TypeOf e.Item Is GridDataItem Then
Dim editLink As HyperLink = DirectCast(e.Item.FindControl("EditLink"), HyperLink)
editLink.Attributes("href") = "#"
editLink.Attributes("onclick") = [String].Format("return ShowEditForm('{0}','{1}');", e.Item.OwnerTableView.DataKeyValues(e.Item.ItemIndex)("ID"), e.Item.ItemIndex)
End If
''Add buttons to footer of grid
If TypeOf e.Item Is GridFooterItem Then
Dim footerItem As GridFooterItem = e.Item
''Creat Ticket button
Dim btn1 As New Button()..........................
View 2 Replies
Jun 14, 2010
Ran into a bit of problem when using PageMethods when calling a webmethod in the code-behind. My markup page has a radgrid which gets populated via the objectdatasource.Pagemethods works and returns data as expected when the objectdatasource binds the radgrid with some data but not when the objectdatasource returns nothing, i.e. radgrid is empty. PageMethods call has got nothing to do with the objectdatasource, I'm simply using its output to build a list of checkboxes dynamically on the client side using Javascript. And this is how my code snippets looks like:Markup page:
<script type="text/javascript">
function CallGetARInvoices(src,dest)
{
[code]...
View 1 Replies
Mar 12, 2010
I am relatively new to asp.net. In My asp.net website, i have a method GetData(int id) which is called Repetitively, depending on id count, GetData is desinged to get data from sharepoint and sql server both. if the Id count is high say =10, my page load time increases because GetData is called 10 times and the page load time keeps adding up. so I want to ask, is there any way that this GetData() be called asynchornously or by the use of some thread, so that my page loads faster.
View 2 Replies
Sep 23, 2010
I'm trying to make API calls to a service provider. I've never tackled JSON requests before but I want to give it a go - as they seem less verbose than XML. Could someone be kind enough to give me a simple example here?
My confusion stems from some libraries I've come across. Do I need to add any libraries to my project? Or is it just a matter of creating a string that complies with JSON syntax and send it via a WebRequest?
View 3 Replies
Nov 18, 2010
We have a page that makes a request to a 3'rd party web service. When under heavy load this response time extends significantly, however the 3'rd party reports back that there times for processing remains constant. There timings show that from the time they receive a request to the time they send it back is always around 1.5-2.0 seconds. Now we are experiencing wait times of over 20 seconds. My understanding of ASP.NET is that each request will run on a IIS thread pool thread and make the request to the 3'rd party service return and process. So I don't really understand what could be blocking on our end. Is there something I am missing?? Is there a threshold limit beyond IIS that is blocking?
If I am missing something a physical book recommendation that covers this subject would also be a very welcome addition to any answer.
View 2 Replies
Jul 9, 2010
I am creating a myspace application and for some database entries I am using generic handlers which I have hosted on another website. From my myspace application I use ajax calls to those handlers to perform the activities that I want. I want to know how can I make these ajax calls secure? I mean I want to be sure that the handlers are being called by only the myspace app and not by entering url into the browser etc.
View 2 Replies