Uploading an Image and Creating a Thumbnail in ASP.NET
Follow these simple steps to let users upload image files and display them as thumbnails in ASP.NET.
Paul Kimmel is the VB Today columnist for www.codeguru.com, and has written several books on object-oriented programming and .NET. Check out his upcoming book Professional DevExpress ASP.NET Controls (from Wiley), now available on Amazon.com and in fine bookstores everywhere. Also watch for his upcoming book Teach Yourself the ADO.NET Entity Framework in 24 Hours (from Sams). You may contact him for technology questions. Paul Kimmel is a Technical Evangelist for Developer Express, Inc, and you can ask him about Developer Express and read his DX blog.
Follow these simple steps to let users upload image files and display them as thumbnails in ASP.NET.
Sometimes when you have all kinds of data what you really need is XML. LINQ to XML let's you employ functional construction to convert your data into XML.
Skins and themes make it much easier to quickly, uniformly, and easily change the way your web application looks.
Obtain client-specific information from your Web application using ActiveX, which only works with Internet Explorer and browsers that have ActiveX extensions.
Programming is hard,debugging is hard. Doing both well is critical to being a good programmer. To make things easier for us Paul Kimmel demonstrates how to run custom Tracepoint with macros.
OP-ED: Unlike the Illuminati, the IEEE exists, and they have a secret. This secret helps them turn out shiny MP3 players, phones, and computers with processing power than we programmers can figure out how to use. This is how they do it. When will developers learn the same truths?
Providing a drop down list in your ASP.NET Web applications help users avoid wasting time with bad data and it's a kinder, gentler thing to do.
Discover how to render an image directly from a database using an IHttpHandler and how to modify the image on its way to the client using GDI+.
You can respond to every HTTP request. Just implement event handlers or an IHttpModule (which is a cool way to write a re-deployable solution for multiple projects).
How do I hide the unneeded features? Don't cut corners just because budgets and staff are being cut.
The security-hole testing that hackers engage results in a sparring match where security-conscious companies like Microsoft are forced to—well, make life harder on the rest of us.
Old school programming, whereby the programmer reads control values and writes inline SQL, still works, but it's so 90s. If you are new to WinForms or Web programming but experienced, peruse the article and then master LINQ.
Elevate your SQL game (a little bit) with CROSS APPLY and OUTER APPLY.
Devexpress has a commitment to providing amazing ASP.NET (and other controls), such as their latest revision of their ASPxGridView, version 8.3, which supports filtering, grouping, sorting, and much more, with little or no coding on your part.
Round those corners and make your user interfaces a little jazzier with a rounded rectangle Panel control; a fun chunk of code to incorporate into your application.
Few projects end up having too much time. Successfully completing a project often depends on tackling core, significant, and risky aspects of any custom solution first—like the long hard march up hill—and finishing with the trim, or cosmetic work, last.
Emitted code and the DynamicMethod have the benefit of speed and the emitted code can be unloaded when the DynamicMethod goes out of scope, resulting in the best of all worlds.
Use Reflection.Emit to speed up Reflection intensive processes by writing one general algorithm that emits a specific solution.
When handed a crate of lemons, make lemonade. Success in a tough economic climate is about perspective and attitude.
One general-purpose algorithm, written one time, is a great time saver for programmers.
Some things that seem hard are actually quite easy, and some things that seem easy take a little work, like that little [X] on a Windows Form, the ControlBox. Learn how to know just when that little bugger is pressed.
The MenuStrip and ToolStripMenuItem are a little harder to use than the Menu from earlier versions of VB. Walk through exercises using the MenuStrip, ToolStrip, and the Command behavior pattern to encapsulate a Recents menu for your applications that operate on files.
Wisdom is figuring out whether every time you encounter a pointy-headed manager you are going to roll over and save your sanity (and possibly your job) or stand up, be counted, and risk greatness or the guillotine. There is a temporary sense of safety in staying with the herd, but all herd-roads lead to the butcher.
Let the .NET Framework write your XML Schema document (XSD) for you.
Learn to add attachments to hyperlinks that contain email addresses by using a little bit of VBA.
LINQ to SQL eliminates SQL Injection Attacks and is easier to use than straight SQL to boot.
The .NET framework is full of small, discrete, and useful classes and big chunky bits. When you start combining the chunky bits, like LINQ to SQL and Windows Communication Foundation, things get interesting real fast.
Developers working at all levels of experience can take advantage of this technique. Discover how to invoke a stored procedure with parameters using the AddWithValue method of the SqlParameterCollection to define SQL parameters in one step.
If a person or group does something successfully one time, ten times, or a hundred times, there is an increasingly better chance that group will succeed again. All of the books in the world won't turn a ten year old kid into Gordy Howe or Wayne Gretzky. There is an element of talent. Find the talent.
ADO.NET 3.0 and the ADO.NET Entity Framework are designed to let you spend less time writing SQL and database plumbing code and more time working in the space of the problem you are trying to solve.
By using LINQ for XML for Objects (aka LINQ to XSD), you can define an XML document and an XML Schema that then can be treated like any other data repository. Discover how Visual Studio makes this easy by generating strongly typed object wrappers that are easy to use.
VB.NET can do anything C# can do. VB.NET is a first class language with all of the object-oriented elements that support mega-enterprise software development. Why then do some outspoken VB programmers feel like they are treated like second class citizens? I say it's a state of mind.
Dynamically construct XML documents in code quickly and easily with LINQ to XML and Functional Construction.
Control the SQL Server service from your VB code using SQL Management Objects (SMO).
Build your applications with built-in "mock types" (aka "services stubs") to facilitate continued development and unit testing even when essential systems services are unavailable.
Learn how to use literal XML with VB9 and embed expressions, such as LINQ queries, in the XML.
Failure rates for custom software projects are astronomical. A few relatively simple choices in how you spend your time and focus your energieswithout all the voodoo of the latest fad processwill make all the difference in the world.
Learn how to implement a Left Outer Join with LINQ.
Learn how to use regular expressions in Visual Studio's Quick Find and Quick Replace dialog for improved code replacement.
You can use LINQ to SQL to define an Object Relational Mapping between SQL tables and then query those tables with LINQ.
Range variables are powerful and flexible. Discover why they are critical to mastering LINQ queries.
Learn how to define Lambda Expressions that perform an action without a return value.
Successful software projects have to begin with the premise that a fixed price, time, and project that is accurate may be a fantasy because there are too many unknowns—people sometimes being the worst offenders. Fix a time and price to what can be fixed and pay for what must be paid for.
Discover a utility for quickly obtaining and managing rectangles within rectangles. The rectangles then can be used to do things such as manage the layout of dynamically generated forms or visualize LINQ queries.
Intellisense is a programmer's best friend. The framework is too big to memorize, but Intellisense can make finding things manageable. Extend Intellisense into your own code with XML comments in Visual Studio 8 and 9.
A Monday morning quarterback is a person who, after the event, offers advice or criticism concerning decisions made by others; or, one who second guesses. Too many Monday morning quarterbacks on Sunday evening can screw up your Focus IQ. Learn what "Focus IQ" is, why you want the score as high as possible, and how to get it there.
Gain an understanding of the difference between Lambda Expressions generated as code and those generated as expression trees. Explore the expression tree and briefly touch on how API developers uses expression trees to convert expressions to other forms, such as to T-SQL.
Everyone has ideas about how to build software. Explore some common fallacies and collect some hints that may help you along the way. All of the ideas are the opinion of the author (who is sometimes wrong).
C++ programmers aren't the only ones who can write code so obtuse that it's nearly indecipherable. Now, VB9 programmers can compete with obscure code by using Lambda Expressions and Currying. But, is this a good thing? Explore Lambda Expressions and Currying, but the jury is still out whether or not currying is a good thing. It's definitely cool.
Discover how to condense your code by using new generic delegates and Lambda Expressions to accomplish more while writing less.