Asp.net - Programming And Common Mistakes A Programmer Makes ?
Apr 26, 2010
What should a web programmer keep in his mind while creating a web application ?What should he keep in his mind i.e. using Session variables, Global.asax file etc.
am having a similar problem. can anyone help me. The files are uploaded here[URL]I am not a programmer and the programmer who designed the form is not available now. If it possible add an loading status icon. so the users can wait for the menu to expand. How to do it?
I have an issue with the appearance of my reorder list. The draghandle div is outside of the item template div. I have used the reorder list in the past and the draghandle was always inside of the item template. I can't seem to find any mistakes so is this a bug or do I have a mistake somewhere. All other functionality works great. Here is the code.
but I am rather confused about what to invest in. I heard that server-side code translates into client-side code. So, if you have an .aspx file, it will be converted to HTML/CSS/JavaScript. I have experience with the latter three technologies put into a rather dull text file and rendered by a web browser. My question is how much HTML/CSS/Javascript coding would I have to do when server-side programming? In other words, can someone using ASP.NET program purely on the server side and not bother to write for the client side? Of course, I don't care about server-side being translated into client-side, but I am wondering if client-side programming needs to be done explicitly and to what degree.
I have a solution I'm working on in VS2010 Professional, using ASP.NET 4.0 with the AJAX Toolkit.This has been working fine, but when I started it up today, I got the runtime exception shown above. This exception occurs on any page with a control from the toolkit.Sometimes when I load a page, I get an exception "Could not load file or assembly 'System.Windows, Version=2.0.5.0, Culture=neutral, ublicKeyToken=7cec85d7bea7798e' or one of its dependencies. The system cannot find the file specified." If I then reload the page (without making any changes), I then get the exception shown in the subject line.I tried dragging an AJAX Toolkit control from the toolbox onto a page, and then deleting it, and that worked - once. The next time I tried the page (or any other), I got the exception again. Dragging a control out didn't help this time.
What's the best way to go about learning PHP when I've been doing ASP/ASP.NET? I'm not sure it's worth the time, but there seem to be so many projects doing it. What do you think? Anyone crossed the worlds? How did you do it?
Im having to update a class that was being used for security validation thru our active directory. i found where i need to add the new security groups allowed to use the application, but everyone within the new groups are not allowed access. I found this bit of code that seems to be trimming the groups name, so could be reason why the new groups dnt work, since they arent named the same as the others. what they were doing so i can update it.
While passing through code in our project I came across a web method that had this code at the end of it:
thread.sleep(6000); return true;
Now, this was done so the jQuery ajax call from the client gets delayed and the ajax animation will show for a little bit longer. This is very wrong in my eyes. There shouldn't be this kind of connection between UI and server side. If he wants the animation to take longer he can use the setTimeOut function in the client side. Here is my problem: how can I explain to the programmer why this is so wrong? Not just because the client/server thing, but why ever call thread.sleep on a website?
The programmer is a C# ASp.NET Developer and is looking to learn his first scripting language. Unfortunately he never had to use it before. He is also looking for something that can be good for his career growth.
I have been assigned the task to create a rules engine with another programmer for a company. They want it totally dynamic (parameterized sql type dynamic, no inline or any wishy washy coding practices). So I have ended up with no idea what to really aim at since this is the first time for this type of project. I am hoping someone has some ideas if they have experience this before. I am thinking of going in this direction.
I use Visual Web Developer 2008 Express. I am following a tutorial which uses VWD2005 and says to create an Ajax enabled website. There is no specifically named "Ajax enabled template" in VWD 2008 Express
I think I have created one by creating a new ASP.NET website and adding a ScriptManager and an UpdatePanel to the page and placing the content of the page inside the UpdatePanel ContentTemplate.
I am trying to rule out reasons why my aplication wont work - step by step, piece by piece, from the beginning of the tutorial.
But each time I do this, the ViewData object seems to disappear (intellisense doesn't show it). Also, Model goes away too. I must be making a really simple/dumb mistake. I also tried to Import the namespace containing the CompanyModel class on the same aspx, but that doesn't do anything.
When I try to view the page in the browser I get this error:
Parser Error Message: Could not load type 'System.Web.Mvc.ViewPage<CompanyModel>'.
In my asp.net application on Windows Server 2008, I have code like this
tempfile = Path.GetTempFileName() ... Write data to tempfile ... File.Move(tempfile, storageDir + fileName)
This works just fine. The problem is afterwards when I am trying to access the file from outside of ASP.NET. I get access denied, even though the user I am accessing from have (recursive) read rights to the storageDir folder.
It seems that the moved file doesn't inherit rights from the folder it is moved into. Is this correct, and if so, is there an easy way to fix that?
Right now as a direct fix I have changed every instance of File.Move() in my ASP.NET application to File.Copy() + File.Delete(), which seems to fix the problem.
In the code below, I learned to use a trigger to either display or hide a panel (pnlMaidenName_Edit) when the user clicks on either side of a radio button (rblGender_Edit). The problem now, however, is that whenever rblGender_Edit is assigned a SelectedValue of 2 for female, the hidden textbox displays in a location way out of position from where it should be. Also, the radio list button displays again, as shown in the following screenshot, near where the textbox now displays.
I am working on a ASP.NET application that uses ASP.NET MVC.I tried naming one of my controllers "AdminController" meaning I typed "Admin" in the new controller text box and it filled out the controller part all by itself of course.This controller never worked until I changed it's name. If I changed the name to anything else it worked with no problems.I looked inside my Global.asax.cs file where the routes were configured and I found no routes leading to it.I tryed adding a route to this new controller like this:
and it worked but then mysiteadmin would only get routed to that specific action.I renamed the controller to AdminSection and it works but I don't understand why it didn't work before.
I am newbie to web technology, and my experience is purely C#. I got an HTML design from a web designer, and I am building over it and learning as I go.I have some web pages for authorized access and others for anonymous users Also, I learned that denying access for anonymous users is done through adding the authorization tag using the following change in the webconfig
I thought you might want to know this, the beta of IIS Express will be released soon, and will make use of the best of both worlds: VS build in web server and IIS in Windows itself. Anyways, IIS Express makes it even easier to build, run and test web applications.
We are migrating a project from classic Asp.Net web forms to Asp.Net MVC. I have followed the fours steps outlined here [URL] and all is working well. Now I want to get Visual Studio to include MVC item templates in the "add new item" dialog. So I add {F85E285D-A4E0-4152-9332-AB1D724D3325}; to the <projecttypeguids> element in the csproj file. So this succeeds in adding MVC support to the Visual Studio "add new item" dialog, but now the build fails. And it fails in the strangest way. The three projects that make up the solution each complete with "build succeeded" but the process ends with a message
Build: 2 succeeded or up-to-date, 1 failed, 0 skipped
I am able to F5 debug, but I am not able to publish. We are using Visual Studio 2008 SP1 and migrating to MVC 2.0. Anyone have any ideas why the build is failing after adding this project type guid?
I was wondering if anyone could tell me why any .aspx page that I drop an Ajax HTML editor on will then become painfully slow to load and update.And more importantly is there anything that can be done about it to speed it up?I am using VS2010 and targeting ASP.Net 4.0 web application and I am using the AjaxControlToolkit version 4.1.40412.2.
I'm fairly inexperienced with JavaScript and jQuery,but I need both for the ASP.Net website I'm working on. I am slowly figuring it out, but I've been relying heavily on StackOverFlow.Does anyone know of any tool (preferably free) that makes debugging JavaScript and jQuery easier?I've been using Firebug which has been helpful,but I guess I'm just spoiled by Visual Studio's debugger and intellisense.Is there anything like that for JavaScript and jQuery?It would sure make my life easier if there were?
Users get firsly to the step0 page, where they fill some info, the page updates, they fill some more, and then get redirected to step1 page.
Problem is that upon getting to the Step1 page, if the user clicks on the back button, then he gets to the last stage of the step0 page, which uses sessions and variables that are no longer existing, what causes a crash.
I'm looking for an elegant way to make sure that with each page visit, the page will restart itself to start phase.
I have this idea maybe twitching the Page_Load function, something about the is_post method, but since each page's post back hits this function,
I'm using Visual Studio 2008 on Windows 7. When I'm editing .aspx file VS stalls and thinks for about 3 sec every time I add a tag. Very frustrating. I'm guessing its doing some kind of compilation or checking. What can I do to make VS more responsive?
I've found that some of my ASP.Net web apps prompt the browser to load plugins that I'm not explicitely using and certainly haven't deliberately referenced in the project settings.Two that come to mind are for MS MediaPlayer and the "SVG Viewer for Netscape".The only commonality I've determined so far is that the two sites/apps affected both use Master pages (nested in some cases).We don't use SVG file types (just the normal mix of jpg/gif/png) and no video/audio (not yet anyway).Can anyone provide a hint as to where the references for these might be creeping in? e.g. Is it a server-level include? Or a .Net runtime default when using master pages?Does anyone else even experience this, or is it just me?