Programming: Web Applications

Web Programming

Start New Discussion
Posted At: 9/30/2019 4:38:26 PM
Posted By: PrintableKanjiEmblem
Viewed: 420 times
0 Dislikes: 0

Not really sure why this happens, usually every time you check out a clean copy of the code to a new directory, but the fix is easy:

Posted At: 6/18/2019 9:13:44 PM
Posted By: Comfortably Anonymous
Viewed: 435 times
0 Dislikes: 0

Intellectually, anyone can learn to code. Anyone can also learn to play piano. But at least with piano someone else can hear the result and recognize the effort. Plus one bad note doesn't cause the piano to burst into flames.

Posted At: 4/18/2019 2:58:45 PM
Posted By: PrintableKanjiEmblem
Viewed: 531 times
1 Dislikes: 0

The biggest "relevant" problem with REST APIs here is the clients need to communicate with multiple data API endpoints. REST APIs require clients to do multiple network round-trips to get their data. They are usually a collection of endpoints where each endpoint represents a resource, so when a client needs data about multiple resources it needs to perform multiple network requests to a REST API and then put together the data it needs by combining multiple responses. In a pure REST API (not a customized one), a client cannot specify which fields to select for a record in that resource. That information is in the REST API service itself and the REST API service will always return all of the fields regardless of which ones the client actually needs. GraphQL’s term for this problem is over-fetching of information that is not needed. It is a waste of network and memory resources for both the client and the server. GraphQL speaks to the data as a graph and data is naturally a graph. If you need to represent any data, the right structure is a graph. The GraphQL runtime allows us to represent our data with a graph API that matches the natural graph shape of that data.

Posted At: 11/2/2018 3:26:11 PM
Posted By: PrintableKanjiEmblem
Viewed: 670 times
0 Dislikes: 0

A few good queries to find out why Oracle is running slow...

Posted At: 5/18/2018 3:13:18 PM
Posted By: PrintableKanjiEmblem
Viewed: 853 times
0 Dislikes: 0

A new tutorial focused on helping existing ASP.NET MVC developers transition to the strange new world of modern Single Page Application development and all the insanity that comes with.

Posted At: 3/8/2018 6:59:33 AM
Posted By: PrintableKanjiEmblem
Viewed: 833 times
0 Dislikes: 0

This series takes you through the development of a full app from the ground up, including the login screen with authentication and authorization.

Posted At: 2/16/2017 3:13:07 PM
Posted By: PrintableKanjiEmblem
Viewed: 950 times
0 Dislikes: 0

A good, interactive, video course that gets introduces all the concepts and makes you actually write some code to progress. Very well done.

Posted At: 10/26/2016 10:50:20 AM
Posted By: PrintableKanjiEmblem
Viewed: 1071 times
0 Dislikes: 0

Whether you are writing an Angular front end for an old application with large use and adoption, or your pre-existing Angular application is gaining momentum, performance is an important aspect. It is important to understand what causes an AngularJS application to slow down, and to be aware of tradeoffs that are made in the development process. This article will walk through some of the more common performance problems caused by AngularJS as well as given suggestions on how to fix and avoid them in the future.

Posted At: 10/14/2016 1:28:58 PM
Posted By: PrintableKanjiEmblem
Viewed: 1076 times
0 Dislikes: 0

If you need a crash course to quickly learn AngularJS, this is pretty good.

Posted At: 12/16/2014 4:27:43 PM
Posted By: PrintableKanjiEmblem
Viewed: 1128 times
0 Dislikes: 0

Toads are not agile. Toads do not need to be agile. Toads are already exactly where they need to be. Toads do not live in clouds. Toads live on the ground, unless they are flying toads, or hyperspace toads, or subterranean intelligent toads. Toads are the foundation of all programming languages. Toads melted steel inb teh WTC. Toads can write in all languages and speak four languages. Toads have fifty eyes on their heads, which is 48 more eyes than most humans. Toads rule the world with justice for all.

Posted At: 10/27/2011 8:16:33 PM
Posted By: Comfortably Anonymous
Viewed: 895 times
0 Dislikes: 0

Thanks to everyone who came out tonight!

Posted At: 9/5/2011 9:25:41 PM
Posted By: Comfortably Anonymous
Viewed: 985 times
0 Dislikes: 0

A list of excellent Entity Framework and ASP.NET MVC resources.

Posted At: 8/19/2010 9:32:36 AM
Posted By: Comfortably Anonymous
Viewed: 1030 times
0 Dislikes: 0

// Returns the month name corresponding to the monthNum passed.
// Returns full month name if abbreviate = false.
// Returns three letter abbreviation of month if abbreviate = true.

function NumToMonth(monthNum, abbreviate) {
    switch (monthNum)
    {
        case 1: if (!abbreviate)
                        return "January";
                    else
                        return "Jan";
                     break;
        case 2: if (!abbreviate)
                        return "February";
                    else
                        return "Feb";
                    break;
        case 3: if (!abbreviate)
                        return "March";
                    else
                        return "Mar";
                    break;
        case 4: if (!abbreviate)
                        return "April";
                    else
                        return "Apr";
                    break;
         case 5: return "May";
                    break;
         case 6: if (!abbreviate)
                        return "June";
                    else
                        return "Jun";
                    break;
         case 7: if (!abbreviate)
                        return "July";
                    else
                        return "Jul";
                    break;
         case 8: if (!abbreviate)
                        return "August";
                    else
                        return "Aug";
                     break;
         case 9: if (!abbreviate)
                        return "September";
                    else
                        return "Sep"; // SEP field??
                     break;
        case 10: if (!abbreviate)
                        return "October";
                      else
                        return "Oct";
                      break;
        case 11: if (!abbreviate)
                        return "November";
                      else
                        return "Nov";
                      break;
        case 12: if (!abbreviate)
                        return "December";
                     else
                        return "Dec";
                      break;
         default:
                return "Unknown monthNum " + monthNum;
                break;
    }
}

Posted At: 3/18/2010 3:59:42 PM
Posted By: Comfortably Anonymous
Viewed: 837 times
0 Dislikes: 0

When you use the UpdatePanel control you probably also want to display some kind of progress bar to the user so they can see when the async. postback starts and when it’s done, at least something that indicate that some work are being done and they need to wait until it’s done. This can be done by using the UpdateProgress control shipped with ASP.Net Ajax 1.0 Extension. If you use the UpdatePanel control and specify an AsyncPostBackTrigger and also associate the UpdateProgress to an UpdaetPanel, the UpdateProgress control will not be displayed.

Posted At: 11/4/2009 11:42:37 AM
Posted By: Comfortably Anonymous
Viewed: 977 times
0 Dislikes: 0

This annoying error is surprisingly easy to fix. Most of the time, it's caused by using the Script tag "incorrectly" (Which seems correct in all other situations, but does not work in this case.):

Posted At: 9/15/2009 2:05:09 PM
Posted By: Comfortably Anonymous
Viewed: 837 times
0 Dislikes: 0

Incredible what a speed boost you can get with your ASP.NET AJAX apps by simply adding a few optional parameters. Shockingly faster in a lot of situations!

Posted At: 3/2/2009 1:48:52 PM
Posted By: Comfortably Anonymous
Viewed: 846 times
0 Dislikes: 0

Just like ViewState, dynamic controls seem to be fodder for much debate, and a source of many confusing issues. This article will be the first of a multi-part series to detail just about everything you could ever want to know about how Dynamic Controls fit in with the framework.

ASP.NET has been out for half a decade. Maybe this article is a little late in the making. But with all of the new technologies coming down the pipe (e.g., Atlas), I thought it would be nice to get back to the basics. After all, not all of us have been in the game since the beginning :)

Actually, this article should probably be titled "TRULY Understanding ASP.NET". Because as you will see, dynamic controls really aren't that special. In learning how they fit in with the page life cycle, and how they are similar to static controls, you will gain an understanding of how ASP.NET works in general.

Posted At: 5/2/2008 11:21:32 AM
Posted By: Comfortably Anonymous
Viewed: 910 times
0 Dislikes: 0

Instantiating a new user control is not as straightforward as you'd think. The logical approach would be like:

UserControl control = new UserControl();
this.Page.Controls.Add(control);

Posted At: 3/5/2008 4:16:00 PM
Posted By: Comfortably Anonymous
Viewed: 897 times
0 Dislikes: 0

A little bit more verbose than the old non-MasterPage way of setting a default button (Meaning the button that will receive a click event when the Enter key is pressed on the form), but still easy to do:

Posted At: 2/2/2008 7:58:01 PM
Posted By: Comfortably Anonymous
Viewed: 1009 times
0 Dislikes: 0

ViewState is a very misunderstood animal. I would like to help put an end to the madness by attempting to explain exactly how the ViewState mechanism works, from beginning to end, and from many different use cases, such as declared controls vs. dynamic controls. There are a lot of great articles out there that try to dispel the myths about ViewState. You might say this is like beating a dead horse (where ViewState is the horse, and the internet is the assailant). But this horse isn't dead, let me tell you. No, he's very much alive and he's stampeding through your living room. We need to beat him down once again. Don't worry, no horses were harmed during the authoring of this article.


http://weblogs.asp.net/infinitiesloop/archive/2006/08/03/Truly-Understanding-Viewstate.aspx

Posted At: 4/25/2007 4:42:33 PM
Posted By: Comfortably Anonymous
Viewed: 1263 times
0 Dislikes: 0
No Summary
Posted At: 1/19/2006 4:56:49 PM
Posted By: Comfortably Anonymous
Viewed: 1769 times
0 Dislikes: 0
No Summary
Posted At: 1/5/2006 11:19:02 AM
Posted By: Comfortably Anonymous
Viewed: 1075 times
0 Dislikes: 0
No Summary
Posted At: 12/8/2005 11:12:08 AM
Posted By: Comfortably Anonymous
Viewed: 1255 times
0 Dislikes: 0

In my last post I discussed how to link to a URL and pass the record identifier from a DataGrid Hyperlink column.

Moving along a bit further with this, you can have the URL opened in a child window by setting the Target field in the DataGrid Property Builder.

However, on doing this, there is a drawback in some cases: The child browser window opens to the same size as the parent browser window, fully occluding the parent window. In my case, I'd rather have the child window open smaller than the parent window to make switching between the two easier. However, I could not find a way to configure a target window size with the DataGrid Property Builder, so I had to research another approach to handling this issue:

The answer is pretty easy:

Open the child window in Visual Studio in Design mode and switch to HTML view and add onload="resizeTo(,)" to the BODY tag of the document.

For example:

If you want it under programmatic control, you can 'punch in' a session variable in place of the Width and Height values and just populate the session variables with the desired size before populating the datagrid:

onload="resizeTo(

Posted At: 12/7/2005 1:28:46 PM
Posted By: Comfortably Anonymous
Viewed: 2108 times
0 Dislikes: 0
No Summary
Posted At: 11/16/2005 1:29:55 PM
Posted By: Comfortably Anonymous
Viewed: 1276 times
0 Dislikes: 0
No Summary
Posted At: 11/16/2005 12:53:19 PM
Posted By: Comfortably Anonymous
Viewed: 1418 times
0 Dislikes: 0
No Summary
Posted At: 10/21/2005 3:03:06 PM
Posted By: Comfortably Anonymous
Viewed: 1956 times
0 Dislikes: 0
No Summary
Posted At: 10/20/2005 9:29:08 AM
Posted By: Comfortably Anonymous
Viewed: 1261 times
0 Dislikes: 0
No Summary
Posted At: 9/3/2005 10:33:18 PM
Posted By: Comfortably Anonymous
Viewed: 1315 times
0 Dislikes: 0
No Summary
Posted At: 8/16/2005 8:40:05 PM
Posted By: Comfortably Anonymous
Viewed: 1282 times
0 Dislikes: 0
No Summary
Posted At: 6/17/2005 12:03:54 PM
Posted By: Comfortably Anonymous
Viewed: 2421 times
0 Dislikes: 0
No Summary
Posted At: 5/14/2005 10:28:58 PM
Posted By: Comfortably Anonymous
Viewed: 1322 times
0 Dislikes: 0
No Summary
Posted At: 5/14/2005 10:22:07 PM
Posted By: Comfortably Anonymous
Viewed: 2146 times
0 Dislikes: 0
No Summary
Posted At: 4/19/2005 10:30:20 AM
Posted By: Comfortably Anonymous
Viewed: 2316 times
0 Dislikes: 0
No Summary
Posted At: 4/7/2005 9:42:21 AM
Posted By: Comfortably Anonymous
Viewed: 1206 times
0 Dislikes: 0

Ran into a strange thing yesterday: I had an ASP.NET project with an existing page with very similar functionality to another page I needed to create, so I just copied the existing page  using the Visual Studio Solution Explorer, renamed the file to the new filename.aspx needed for the new page, changed the Class name in the .vb code to match the new filename (Otherwise the class name of the copied file would collide with the class name of the original file I copied from.), and then tweaked the code to change the little bit of the code (and a little bit of the HTML part as well) that needed to differ in functionality from the original.

I went to try it out in the browser. The HTML part of the page looked correctly modified, but the data being displayed was from the database table being accessed by the original file.

Did I forget to change the table name? Probably, I've done dumber things...  I bring up the new code in the editor, and see that I did indeed change the table name in the query. So what in the??

I added a quick Response.Write("This is a test") to the code, do a Rebuild Solution, and try it again in the browser. Same thing, and the "This is a test" does not appear.

Strange. Very strange.

Next thing I try I don't think will work: I add a Response.Write("This is the original code") to the original .aspx file that I copied from. Rebuild. Try again. The "This is the original code" shows up in the COPIED code that should say "This is a test".

Now I'm really stumped. I look through the project using Windows Explorer and open individual files using UltraEdit rather than Visual Studio. I'm a little worried about the .resx files, they contain stuff like "PublicKeyToken=b77a5c561934e089" that I'm not all that sure what they are supposed to mean. Is it possible that there is some kind of unique GUID identifying the original file is tagged into the .resx file for the copied code, and it will always point to the original? I hope not.

I'm also working with my code checked into Visual Source Safe. Is there something confused there since the original code I copied from was already checked in? Is Source Safe unable to differentiate between the two files? I check everything out, delete the .resx file for the copied code, rebuild the project, check everything back into SourceSafe, then try again. Same thing. Still could be Source Safe, but unsure what to go on.

It's the end of the day, so I leave myself some notes on my theories about what might be wrong so I can pick it up in the morning. Gettting away from a project is usually the best thing to do when you're stuck. That holds for this problem as well.

I return in the morning. Re-read my notes. Think about it for a while. Finally get to looking at the .aspx (not the .aspx.vb) code in UltraEdit again. (Sometimes it does some good to get away from all the hand-holding that Visual Studio does for you in cases of weirdness like this.) I finally find it: At the very top of the .aspx file, there is the line that looks like:

Posted At: 3/28/2003 11:31:51 AM
Posted By: Comfortably Anonymous
Viewed: 1522 times
0 Dislikes: 0
No Summary
Posted At: 9/16/2002 1:00:09 PM
Posted By: Comfortably Anonymous
Viewed: 1679 times
0 Dislikes: 0
No Summary
Posted At: 6/24/2002 10:59:31 AM
Posted By: Comfortably Anonymous
Viewed: 1382 times
0 Dislikes: 0
No Summary
Posted At: 8/3/2001 7:11:43 PM
Posted By: Comfortably Anonymous
Viewed: 1783 times
0 Dislikes: 0
No Summary