while two users are editing their data from different location,
when both clicks submit button at the same time, one user information is inserted in other user information automatically..
i do not know why this happens..
Need help to solve this issue.
Thnx in advance.
If you are storing the data in a database, a transaction is crucial.
Maybe use locking mechanism?
http://msdn.microsoft.com/en-us/library/c5kehkcz(v=vs.71).aspx
Worked fine for me in ASP.NET as far as I remember.
Related
Have landed into a scenario.
I have a user control in which I have few images. First image helps me to open a pop-up(different aspx page). I do some operations and save some stuffs to the DB, it has few textboxes and list views etc. This works pretty fine.
I need to implement the Edit functionality to the same popup. I haven't done this kinda thing earlier, hence don't have much idea on it. Googling din't too help much.
How should I go ahead and implement the Edit functionality.
I need to open the same pop up with the textboxes and listviews loaded with values from DB and need to edit that.
I am dilemmic as to how to start on this.
Pointers will be highly appreciated.
Regards
Anurag
I would like to integrate a Cache Manager in an ASP.NET application. Basically I would like a page that would display what's in the cache and let me delete specific items or clear the whole cache. Ideally I would like as much information as possible, such as how long it's been in the cache for, the hit count, the size of the object, possibly see the object itself, etc. Of course I realize that some of this information might not be available from the default cache API.
I think it would be fairly easy to implement but I don't want to reinvent the wheel. I did a search and came across that one:
http://aspalliance.com/cachemanager/Screenshots.aspx
Just wondering if there are other options that I could compare.
Cheers
I use this code to view the cache data.
http://www.codeproject.com/KB/session/exploresessionandcache.aspx
Its not a cache manager, but its a good point to start.
You can use one of the following open source cache solution if you find it useful
http://csharp-source.net/open-source/cache-solutions
hope it helps
it looks like nobody has posted on this.
I have a very typical set up, an ajax update panel is updated when a drop list of offices changes. Each form could have it's own values, for instance each store will have it's own list of employees. Here is where the fun begins. The form can be changed by the drop down (new office) or validated and submitted.
On drop down change, I create a new instance of the same rad combo, bind it to the current data, confirm that the correct data is bound. Then on the return trip I see selected the default user from the previous user. This is a composite control, and firebug shows me that the value for the "text box" that simulates the combo still has the old value. I'm suspecting onViewStateLoaded, but turning viewstate off for the Telerik didn't help any. II don;t need it anyway, cuz I have to put the selected value in another hidden to make a cross page post on submit. Any ideas before I hack this up really bad? Any will be appreciated.
I would answer your question directly, but I don't have enough info, as I was not able to duplicate the issue here locally.
Have you tried contacting Telerik support, or using their forums? I've found them to be quite responsive, even offer custom dll's for some solutions.
Like Jeff, I have a difficult time rebuilding your scenario from the description. The fastest way to solve this problem is to open a Telerik Support Ticket. If you can provide a basic sample the exhibits the problem, the support team will quickly respond with a solution. Don't miss that valuable part of your Telerik purchase! That's what separates commercial tools from unsupported options.
If you'd prefer to keep troubleshooting, I'd try stepping back and simplifying your scenario. It sounds like some hacking has already begun and I think that may be leading to unusual results.
Specifically, the step where you create a new RadComboBox on post should not be required. If you can share some more code examples, I'll be happy to help further.
I have taken some text field and abd some labels and one submit and one reset button. I want to code like: when i enter some values in text boxes and click upon submit my record will get submitted into the database. And when i click upon reset then my form will get reset.
Please let me know how will i code this scenario.
Thanks,
Ashish
With due respect, this question is rather broad and you would likely be better served by doing a bit of searching for some base knowledge about the tasks that you are looking to perform.
I would suggest that you begin by going to your favorite search engine and querying for:
HTML Forms
Insert data into a database
ASP.NET Tutorials
Once you have a grasp of the basic technologies that you're using, you should find that it is far easier to accomplish your task. If, by chance, you run into any specific problems or issues, then this would be a great place to ask questions related to them. Best of luck.
asp.net and databases
http://www.asp101.com/samples/db_add.asp
resetting the forms
http://www.java2s.com/Code/ASP/Asp-Control/Resettheform.htm
you should try using google first. these examples came up on top for simple queries like
asp.net databases
and
asp.net reset forms
that said you have not really provided enough information to garner a useful answer.
what database are you using, what version of asp.net (are you even using it, or did you click the tag by accident - you
dont mention it in your post), what platform - specifically?
We are working on Grid Views in an ASP.NET application.
Here we would like to avoid the database calls for binding dataset/data table to grid view whenever a user clicks on sort (column sorting), pagination links or whenever he updates a record.
Would you please let me know the best practice to handle it?
If would be great if you could also provide a reference document or web references (If needed).
Many Thanks,
Regards,
Nani.
If you want your users to have extensive sorting, pagination and editing capabilities without frequent database calls, you'd be better off creating a fat Windows client. Web apps in general are better for thin clients.
You could do all your sorting and editing client-side with JavaScript, but that would be an incredibly bad idea. I would say: let your server and your database do what they're good at, and don't be overly concerned with minimizing their roles in your application.
You have a few options here, but they all have their own pitfalls and are often worse than just hitting the database again. Some possibilities:
Save the DataSource in the Cache. See Caching Application Data for a good overview.
For small amounts of serializable data, you can consider saving it to the Page's ViewState. The drawback of this is that it increases the size of the HTML you send to the client, so you need to balance that against the time you may be saving by not hitting the database again. Scott Mitchell's Understanding ViewState is a great introduction to this.
Just for completeness' sake - this one is terrible: you can save the GridView's DataSource in the user's Session. This eats up your web server's memory; you probably should not use this technique except for prototyping (in which case you might as well hit the database again).
Finally, you should absolutely take seriously the advice in these other answers.
I think you will be hard pressed to make this optimization of any use. Are the GridView sort/update/page functions taking a lot (inordinate) of time to complete? You might need to look at the database design as well.