Another object on this page already uses ID 'XXXXXXX' - asp.net

I am receiving a warning from Visual Studio 2010 that every single control in my ASP.net project has a duplicate ID. This is obviously not the case, since I named all hundred or so controls on the page myself, and I made sure not to allow any duplicates. Has anyone else run into this and found a fix?
Thanks

restarting will work occasionally, but often the solution is to right click the "unrendered" control and select 'update'. This does the trick.

Related

how can i cancel saving the form's records automatically in ms-access 2010 macro

i designed a form in ms-access 2010 . it's based on a table . i want that when the user enter data into the form and shift to the next or previous record the last record he had been in, by default changes to read-only property to prevent the user from editing any data by mistake
i hope the answer be by ms-access 2010 macro
second question :
actually , i googled my question before asking but i failed the real reason
when i designed a program in ms-access-vba to be used across multiple pcs , i face a big problem
the problem that the code does not work at all on some pcs unless i setup a version of windows 7 on the pc that the code doesnot work . and this solution is annoying and impractical
i hope to solve this annoying problem
that's why i ask every time from you all that answers be by macro not by vba .although i love vba but macro proved to be the alternative soultion to this problem
what shall i do?
any ideas for that problem
thank you very much in advance
There is a property you should check Form.DataEntry allows you to enable the form to ONLY add new records, but not editing.
Form.DataEntry property (Access)
Play with VBA, make the form as only to add records, and then allow users to edit records only if they click in the button to edit. That way you can prevent mistakes as you wish.
I do now know how your database is designed and how your forms are designed/linked, but what I do is loading the same form in 1 mode or another (adding or editing), depending where the user clicks. That way, for me, is easier to control mistakes.

Website doesn't build, but works correctly in browser ASP.net

When I build my website project using visual studio 2016 (or any visual studio for that matter), the compiler gives me an error:
However if I go to the code file ResetPassword.aspx the edtEmployeeSurname control is present and it has a runat="server" attribute.
There is also no errors given to me if I open the ResetPassword.aspx.vb code file. (So no red lines under any variable names / Control ID's).
What is really interesting is that the website (Even ResetPassword.aspx) loads correctly from the browser without any issues and I can submit the form.
If I comment out all the code in ResetPassword.aspx.vb then it just finds another control that "Doesn't Exist" and so it carries on with a lot of pages.
All I want to know is:
What causes these issues
How to fix these issues OR how to determine what the issue is.
If this is a common mistake that some developers make then please help me to formulate a search string to use in google, because most of my search results were obscure or off topic.
I've run into this sort of thing before and I believe the errors you are seeing are red herrings. They lead me to believe that one of your lower projects where your user controls are defined, or possibly even lower than that, has a possibly unrelated error in it which is causing it to not be built by visual studio, which in turn makes visual studio think your user controls aren't defined.
What I normally do is build the solution and watch the output window. It will build all of your projects individually, the first error you see pop up in the output window is the source of your problem. Everything else you are seeing is a symptom of that original issue. If you fix the first error that shows up in your output then it will either build correctly or you will have to repeat the process with the next error that pops up.
Visual Studio used to order the errors in the error list in the order that they came up during the build but that has changed, I, personally, really preferred the old sorting(I think there is a setting that you can use to get back to the old sorting but I can't think of it off the top of my head).
From screenshots, it shows you have 50 errors in your project. There is no way an application will run successfully if you have not set to do so.
You could make application run, even if errors.
Check SO post :
Debugging runs even with compiler's errors in Visual Studio
Note:
If you have already cleaned and rebuilt solution,
Try running application in other browser or another computer, may be you have data shown from previous successful result.
Based on the wording of the error, I believe it's possible you are referring to some of these controls outside the code behind of ResetPassword.aspx. The latter part of the message says It may be inaccessible due to its protection level. By default, the backing variable for a control you place on a form is Protected and therefore cannot be seen outside the scope of that control or its inheritance chain.

Wrong reports by fastreport

We are using fastreport as report-engine for our asp.net-mvc-webapplication. Since months we are encountering heavy problems in using fastreport. Reports are shown in a seperate tab. They always include the fastreport-bar containing the refresh-button. This fastreport-refresh button refreshs the report by using the internal cache of fastreport. But at this point something is going wrong:
When the user refreshs the report a completely different report is shown. This refresh is a fastreport-function and does not involve any of our sourcecode. Users using the reports seems also having trouble with their session. They are regular asked to relogin since the session/authentication is not valid any more - users don't using any reports do not have these issues. Refreshing by browser is no problem.
Since we have not yet found a solution in collaboration with fastreport we are looking for other users encountering this issue and may have a solution.
You can send your message on support.fast-report.com. Also attach test project there.

SSRS/RDLC Detail Data Single Value repeated

I have been plagued with an issue for SSRS (really RDLC report viewer report) in that the details rendered in a report are the same value all the way down in a group. I faced this before and ended up having to create a new view and pull it into the solution and rebuild the report from scratch. As I am having this again I really want to know what else to try. I have deleted the tableadpator and added it back again, tried cleaning and rebuilding solution. I had altered a view, added a couple of columns to the end, so that is my suspect item as another report that uses the same base view now has a similar problem. This is not a code specific example and sure hoping someone else has seen this behavior and know how to get rid of it.
So I have a ASP.Net web application that uses the report viewer to render some reports, RDLC. I use entity framework for my data access and bind the data to the report.
I found what seems to have been the problem. I am using Entity Framework (EF) and I updated some views to add additional columns for reporting. EF randomly picks a key for columns. If I manually set the key to what it should be, and I set my grouping to be on an ID column rather than text (not sure this really fixed it, but adding as it is part of my solution), then the report is now not duplicating the same data for each row. The odd thing was the count of rows for the group was correct, just somehow would only render the first row data for each row. I know this is not a great example of the root problem and fix, but at least all the reports I had issues with are now working and the only thing that changed for some was the EF model was updated for the view that would bind to the RDLC report.

How do I delete records from a Datagrid as well in the database in ASP.NET using checkboxes?

How do I delete records from a DataGrid as well as the source database in ASP.NET using a checkbox to select them?
Step 1:
Lookup how to get the references to the selected items in the grid control.
Step 2:
Delete directly from the database using the references in step 1
Step 3: Refresh the grid control / page.
HTH
In the spirit of what makes this a good programming site, it behooves you to at least try to solve the problem yourself first.
Once you have had a decent go and can provide some samples of the way you have attempted to resolve your problem then the people here will be glad to help.
Simply expecting others to gift you with a solution is not really what this site is all about.
My suggestion is to go and do some research, have a go at solving this yourself and then come back and ask a question related to the specific problem you are facing when attempting to resolve this.

Resources