the asp file is unreadable because of unkown reason, but it still can work normally. now i want to change the function, so i have to recover the messy code and edit it. is there anyone know how to recover the destroyed asp file? thanks!
Related
Would it cause any trouble to set the web.config file to read only? I ask this because I stupidly overwrote the file on an asp.net page that I had been maintaining and it screwed things up. I'd like to avoid that in the future, but I am not sure if it will just create a whole 'nother problem.
Thanks
I've been trying to figure out how to make the current SlickUpload 6.1.7 play nice in a form that does not require someone to include files. We want it to be optional. This form is for people to contact us, and we want to give them the option to include attachments, just not require it. It works if you upload a file, however the form will not submit, if you do not upload any file.
We are trying to use the Ajax version with Memory stream, but the 'AspNetAjaxCs-VS2010' sample code is not helping much... the documentation is sparse, and the samples have little constancy between them, making it hard to understand how exactly it all works. (at least for me) The fact that they got bought out, and the new owner company pretty much ignores people unless they are paying for it, is not cool.
Any ideas?
You could use a div to detect a drop inside your page. That way you could only activate it when the user really need it, or whenever the using actually select something for uploading, like a trigger.
I'm not sure I understand your question, but if so, it sounds like you already have a form that you want to use SlickUpload with to upload files IF there are files to be uploaded. Are you using the CustomUploadStreamProvider form?
I had to change some code that was created by another person in VS2008, I converted it to the VS2010 version and was working just fine until the moment I needed to change a master page file. The moment I opened it, it gave me a lot of "does not exist in the current context" errors from the code behind showing that the code behind file could not find some of the controls declared in the master page file.
So, the code that gets errors is like this:
<li class='<asp:Literal ID="litLIClass_Test1" runat="server"/>'>stuff</li>
As you can see, the <li> CSS class is being generated inside that ASP literal, but it seems that the ASP literal doesn't get initialized.
However, it seemed to be working before, and I am trying to understand why it started giving me errors when I opened the page code for the first time in VS2010. Is there a particular setting that enables this kind of nesting? Could there be different settings in VS2008/2010?
In my experience, this is usually a Namespace not matching issue.
A few things to try:
I list this as #1 because it's the quickest, Make sure your local
web server is also turned off, Restart Visual Studio, Recompile (it
works sometimes in my experience). Make sure that the namespace in
your code behind file matches the namespace in your page (if it's
WebForms). I assume this also includes the master page but I don't
know, I do know that you can get this error when the ASPX and the
code behind namespaces are off.
If it's a code behind scenario, make sure the form is inherited properly.
Make sure you're not missing a reference you need. This is a common
cause of the error, especially when upgrading. Your code files
maybe identical but your web.config or what is referenced by default
might have changed.
I've read that this can be caused by two forms pointing to the same
code file, but I've never actually experienced that (nor do I do
that).
References:
http://msdn.microsoft.com/en-us/library/t8zbaa6f.aspx
http://geekswithblogs.net/mikehuguet/archive/2011/01/03/143332.aspx
(I had more reference links to post but I can't because I don't have the reputation yet). ;)
I have been asked to support a legacy app and I can't get access to the code behind files. I need to add a new feature that gets a list of items from the database on page_load, what way would adding an "in-page" page_load affect the compiled page_load?
What would be the best approach to take with this?
Since you mentioned that the legacy app has a Page_Load I assume it's .NET. This means that you should be able to decompile it using Reflector from Redgate to get the original source.
The source will likely be much less "pretty" than it was originally, but you should be able to get editable, compilable source out of it.
As for the question of an in-page page load and a compiled page load - You can try it... But I doubt it will work. You're really better off trying to get the source if you can.
When using Asp.net server controls, especially formviews, I often don't use all possible modes. So I end up with a ton of template HTML that is never going to be used. This is a pain to work with when I'm in HTML Source mode. Is there any reason why I shouldn't just delete the excess HTML?
No. If you know that you're never going to need it, just delete it. ;)
If you dont need it, delete it. If you need it in the future you can always get it from source control.
Removing unused html from your file will make it smaller, decreasing the file size that needs to get transmitted over the wire.