I have a simple asp.net gridview control on a page. The control is bound to SQLDataSource. The gridview control is set to enable editing. When I run the page on my development server the editing function works as it should, i.e. you select edit, modify a column the select update and the change is saved. When I put the page on the live server and select edit I get the edit functionality, but the Update link does not work. It would appear the page does not post back as nothing happens when the Update link is selected. The javascript embeded in the update link (Update) appears to be the same as what is embedded in the update on my dev. server. The Cancel link functionality does work.
Any thoughts on why this would not on the production server? I have another page with the same functionality and it works fine. Can't see any differences.
Thanks for any assistance.
My guess is that you don't have permissions to write to your data source. I just had this same problem and it turned out that in IIS I needed to grant write access to the appropriate folder on the server (my data source was an xml file).
Related
I've edited an ascx.cs page which I thought was relevant. When I ran the service to debug that code it wasn't the right place - The breakpoint didn't stop the service.
I know how to find the right page to edit but now I want to see what did I edit.
How can I open the page or find which pages are referring to it so I could check it also?
Have you "set as startup" that project already ? then try setting that page aspx.cs as "startup page".
After setting above both , your project will start that same projects same page that you have set up as startup.
Alternatively you can type link to that manually in address bar to get there.
While trying to set it as startup page I've found out it ascx and not aspx file. So if You want I wanted to see the edits I would need to load that page as asp controller.
I've created a new ASP.NET Web Application for my project. While debugging, Visual Studio is not allowing me to make changes to my code behind (default.aspx.cs).
When I try, I get the "Edit and Continue" dialog letting me know that "Changes are not allowed while code is running or if the option 'Break all processes when one process breaks' is disabled.
but I'm able to edit my default.aspx
Am I missing an option somewhere?
I know exactly what you mean. Turn off "Enable Edit and Continue" setting (in tools->options->debugging->general). Now you can edit .aspx.cs Content while it's debugging on Local IIS.
You are allowed to changes ASPX page because this page is going to be rendered at client side and changes made in page will be directly affected to client browser.
But When you change in CodeBehind visual studio will not allow to change the code because your code needs to be compile again and dll generated to your application needs to be created again with the updated code. That is why it will not allow you to change it.
If you want to change code, you will have to stop the application, change code and run the application again.
If you want to change the value of defined variable at debug time then you can directly change it by moving cursor on it and reassigning value.
Another option to change the value of variable at debug time is from Immediate window.
If you still want to update the code then follow below steps :
Right Click on the Project
Select Properties
Select Web in Right Panel
Check 'Checkbox' at the bottom saying : 'Enable Edit and Continue'
Refer : http://blogs.msdn.com/b/visualstudioalm/archive/2013/06/26/debugging-support-for-64-bit-edit-and-continue-in-visual-studio-2013.aspx
Probably you need to change this when running and debugging multiple projects at the same time:
Break All Processes When One Process Breaks
http://blogs.msdn.com/b/zainnab/archive/2010/10/22/break-all-processes-when-one-process-breaks-vstipdebug0029.aspx
Perhaps yesterday, you was working only with one project and today you are debugging multiple projects. Thats the difference.
Anyway, first answer is good too.
I'm using VS2010 to create a simple aspx page with a ReportViewer control on it. The ReportViewer control loads a remote report from the server. That seems to work fine.
But when I fill in the textfields of the report, to filter on same data then nothing is shown...
I can clearly see that it is making a request through FireBug. But the request goes through localhost, but the reports are on a different server.
Doesn't that mean i have to specify a URL or something in the form tag? Both the ReportViewer and the ScriptManager are placed in a form tag with runat="server".
So i'm not sure if i need to specify manually to what server to request has to be made for the ReportViewer to work properly.
Because all i see currently is the textfields of the report with which i can filter the data. But no report it shown, which normally appears underneath the input fields. The rest is just plain white.
Anyone any idea what i have to do?
The runat="server" is specifying if it should run on the server or the clients computer, it doesn't really have to do with the ReportViewer Control specifically, this is an ASP.NET thing.
See here: runat="Server"
In order to get Reports to be fetched from a server you should look into Remote Mode,
See here: Remote Mode
Hope this was enough to get you the results you need.
After updating the record in the datagridview i had redirected it to the same page using server.redirect. But its remaining on the same page and showing the error 'server cannot display the page'. But the record is updating in the database. and if I copy the url and paste it in the other instance of the browser the datagridview shows the record with updated values. When I run the solution on local machine its working fine but after posting on the dev server the above error is coming.
Please, suggest any solution on this.
Thank you.
Why are you using server.redirect? If it's the same page, just complete the operations and allow it to post back.
Regarding why it's crashing, please post code...although simply using post back will probably fix the issue.
I have a update panel, in the update panel I have fileupload control and button control, On button click, I need the file that I have upload in the fileupload control in updatepanel.
Exact scenario, I have 8 tabs on page, each tab contains too much information, One of the tab is Attachment, when user click on Add New Attachment Modal Popup shown, Modal contains detailsview in Updatepanel and in the detailsview I have fileupload control, when user hit save button, detailsview inserting event fired, In the inserting event I need the file that I have upload.
Please Note, My page is heavy and I don't want full postBack.
Does anyone have solution of this issue?
Advance thanks for your kind help.....
For solve this problem, Please see the following step.
Add ajax-upload to your detail view.
iframe-based uploader like Resource#1.
Silverlight-based & Flash-based uploader. I like this technique because it doesn't require any server-side script for display current upload status. But in HTML5, you can create this without using any web browser plug-in.
Commercial uploader like Resource#2. that use hidden iframe for uploading.
Upload file to temporary location.
System response the temporary location. Next, client keep temporary location in hidden input in detail form.
Keep temporary location with session_id. You can store it in database or Session variable depend on your framework.
When you click on the save button, the system will move the files to their real location
Note. System will automatically delete the expired file from the temporary location.
Resource
ASP.NET File Upload with Real-Time Progress Bar
ASP.NET File Upload like GMail (Commercial)
Update
After almost one year, I just found a great 3rd-parties control for this question. This is an open source plug-in of jQuery. It name Plupload that allows you to upload files using HTML5, Silverlight, Flash or normal forms and it provide some unique features such as upload progress, image resizing and chunked uploads.
You can try & test Plupload by click here.
Can't be done without co-operating binaries being installed on the client. There is no safe mechanism for an AJAX framework to read the contents of a file and therefore be able to send it to the server. The browser supports that only as a multipart form post from a file input box.
The problem is with the way the HTML file upload control works, has nothing to do with ASP.net, for the file upload control to work you need a full post of the form data. You can only simulate that your are not doing a full postback, by doing all the operation in a hidden iframe that does the actual uploading
The sites you see that do provide this functionality generally use flash or an iframe so that the postback occurs in the iframe and gives the illusion of an ajax request.
HTH
OneSHOT
I've tried swfupload (http://swfupload.org/), but do keep in mind that you have to jump through hoops if you're using forms authentication with non-IE browsers. This is apparently a flash bug, and it's not fixed in flash 10. I decided against using it in our framework because of this bug, but it was otherwise a great product.
I recommend the uploader widget from YUI. See http://developer.yahoo.com/yui/uploader/
I think you could use it to accomplish your goal. Your javascript would need to fetch the file back down to the client from the server after it completed its upload. But the page would not refresh--the upload is through flash and a hidden iframe. The download to show the file's contents to the user would be via ajax.
If the user does not "approve" the upload, then simply make another ajax call to the server to delete the file.