I have a situation in which I select an account and I want to bring back its details. This is a single UpdatePanel round trip and its quite quick.
In addition, I need to bring back some transactional information which is from a much bigger table and takes a couple of seconds for the query to come back. Ideally, I would like to put this into a second update panel and update this additional information once it has been received, but after the first update panel has updated i.e. the user sees:
Change account See account details (almost instant) See transactional info (2 seconds later) The only way I can think of doing this is to use javascript to cause a SECOND postback once the account details have been retrieved to get the transaction information. Is there a better way?
I'm running this asp.net site with an AJAX updatePanel on my local machine, and everything works just fine, since it's where I developed it. Now, a few days ago, I uploaded the files to my web-host and assigned every single DataBase, and there is no error messages, even though it's still set to debug mode. There is a problem though, whenever I click an element which triggers my asp.net AJAX updatePanel to update, the whole site is updated(which it should not, only the Panel), and my jQuery's (document).ready is called every time as well.
I thought my issue was related to the Validators not working in UpdatePanels but that does not seem to be the case.
All validators fire when they should but, the error warning message clears when the updatepanel updates.
for example...
textbox1 range 1 to 23. dropdown1 updates the updatepanel. enter 99 error shows, but will disapear when I change value of dropdown1. textbox1 value still 99 so validator message should still show but it does not.
Is it frowned upon to work in visual developer express directly from the published web site? I'm having real problems getting my changes recompiled I think. I've even gone so far as to stop iis and then build the web site, but changes just arent getting published. New pages I add seem to work fine, but pages that were already there before seem to not want to update. I change variables and its like they are just ignored. When I go to the web root, the changes are reflected in the files, it just appears that the changes arent making it to the running config.Is it recommended to work with a project outside of IIS and then just republish the site over and over again? Or do I have another issue?
I need to work with some rows of data and then update the database as I do using SQL similar to the following:
[Code]....
My question is: Is there any reason at all why I'd want to use EF for this?
I'm using Entity Frameworks in this project so I'd even be willing to use it to maintain project consistency if all else were equal. But I'm thinking it is just more work in this case. Instead of a simple SQL statement, I must query the data, change it, and then update it, which is not only less work but far less efficient as well.
Perhaps EF has an efficient way of doing stuff like this that I just don't yet know about?
My company sales staff uses an Access database for order tracking (mostly). I would like to transfer some of the data to an externally hosted SQL 2005 database so that I can allow sales to check order status online while outside of the office. The Access database is on our internal file server. Is there a way to to update the data from the Access file to the external database on an hourly basis without opening a gaping hole in security? Is there a method or scripting language that might be more secure than another in this situation?
I have two update panels and one javascript control.
When the javascript button is clicked, it forces a partial postback on UpdatePanel2. UpdatePanel2 is populated with dynamically created buttons that have javascript effects (jquery) but when click can also induce a postback. My problem is that, when clicking on these dynamic buttons, the whole page does not do a partial post back but rather UpdatePanel2 itself does a partial postback and everything is gone.
However, what I want to do is be able to tie each of the dynamic buttons in UpdatePanel2 (After being dynamically created) and make them an asychnonous triggers to UpdatePanel1. So that when clicking on these dynamic buttons, ONLY UpdatePanel1 is doing a partial postback refresh. UpdatePanel2 stays put and remains the same.
I have a serveral ASP.Net webpages with multiple functions that I am optimizing. Each function is being moved into a usercontrol that will be called by an AJAX function to replace that part of the page. The function (see below) works for some controls, but not others. The error message returned is "Error executing child request for handler 'System.Web.UI.Page'."
To isolate the problem, I created a new user control with nothing but a textbox on it and it failed. Same thing for many of the others controls. However, put nothing but a Label, repeater, or pic onto the control, and it works.Is this the correct way to do partial updates back to the page? Or should I be using a different approach?
I got the database to update, but it only does it for the first row selected not for the others. Protected Sub btnUpdate_Click(ByVal sender As Object, ByVal e As EventArgs) For Each row As GridViewRow In GridView6.Rows ' Selects the text from the TextBox Dim selectedcheck As CheckBox = CType(row.FindControl("chkselect"), CheckBox) If selectedcheck.Checked = True Then Dim id As Label = CType(row.FindControl("id"), Label) cmd.Parameters.AddWithValue("@id", id.Text) cmd.Parameters.AddWithValue("@compby", txtagent.Text) cmd.Parameters.AddWithValue("@compdate", lbldate.Text) cmd.Parameters.AddWithValue("@comments", txtcomments.Text) cmd.CommandText = "dbo.updatetasks" cmd.CommandType = CommandType.StoredProcedure cmd.Connection = conn conn.Open() cmd.BeginExecuteNonQuery() conn.Close() End If Next End Sub UPDATE dashboardtasks SET compby = @compby, comments = @comments, compdate = @compdate WHERE id = @id;
I have relates to how we update using a view model. I am trying to pin down whether a viewmodel is disposed once a View is rendered to the browser or whether the viewmodel continues to exist even after the View has been rendered.
Essentially I have in my viewmodel the following code:
[Code]....
This is used to bind html elements in my view so if I need to make a modification to a Item contained in the list can I simply access this and post the VM back to the controller or do I need to post a Item object back to the controller in the singular. Secondly where is the best place to build a gui control such as a table. If in the view I have a foreach loop and write out table fields is this the most appropriate way of achieving this or should I deal with this in the Controller or Model and pass it to the gui in the View Model?
How do you implement a real-time update like Twitter does ("423 more tweets since you started searching")? I need to refresh my page at least every 10 seconds. I'm using ASP.NET MVC and jquery.
I would like to display real time updates on a web page (based on a status field in a database table that is altered by an external process). Based on my research, there are several ways of doing this.
Long Polling (Comet) - This seems to be complex to implement Regular Polling - I can have an AJAX method trigger a database hit every 5seconds to get the current status. But I fear this will have performance issues.
Then I read about using SqlCacheDependency - basically the cache gets invalidated based on a field in the table. I am assuming I can use the event trigerred when the cache is invalidated to show the new update to the user?
i am using a TabContainer and at each TabPanel i have embed an UpdatePanel in order to update each tab alone.
this is my code:
[Code]....
the problem is that it makes several seconds to update each tab (the same time for every tab) and i asume that this is happening because it updates all the TabContainer and not the selected Tab.
We currently have a page with a listview control that has textboxes and an update button for each row. Users are able to update the database one row at a time.This is problematic in countries where the internet connections are very slow because a round trip is needed for each row update and this can become impossible to use.We need to create a page which allows multiple row updates so that each round trip is more productive. There woudl be just one update button on each page and users could enter values into each row. Clicking the update button would update each changed row of the database.We currently use linq 2 sql. I would imagine that we could still use this in the above scenario??? Or is there a better data connection methode to use in this scenario.
I have an asp.net page that calls a dll that will start a long process that updates product information. As the process is running, I want to provide the user with constant updates on which product that process is on and the status of the products. I've been having trouble getting this to work. I add information to a log text file and I was thinking that I'd redirect to a new page and have that page use Javascript to read from the text file every few seconds. My question is has anyone else tried this and does it work fairly well?
So I'm trying to make my own forum signature generator for some friends, and I've gotten most of the work done. My real issue now is refreshing the information when the image is requested from my server.
Basically, I'm looking for someone to push me in the right direction on how to have the image refresh from the datasource when it gets requested, but only if it has been more than 5 minutes to prevent an overload.