Wrox Programmer Forums
|
.NET Framework 2.0 For discussion of the Microsoft .NET Framework 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the .NET Framework 2.0 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 16th, 2006, 08:54 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 217
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to mega
Default Where did my website dll go?

Hi all.

I just moved to ASP.NET 2.0 and some things confuse me. Like where is the dll that used to get dropped in my bin folder? I guess it's because ASP.NET compiles at runtime..
Another thing is where is the server-side controls defined? Usually there is a protected definition of each control at the top of my .cs file, now there's none - but it still works. What is going on behind the scenes and how can I be sure that no old controls lives somewhere in my page class?
Also, I got a problem with Server.UrlEncode/Decode. In ASP.NET 1.x I could type in characters like æ, ø and å as querystring values and (I guess because ASP.NET is in Unicode-16) ASP.NET converted it automatically between pages. Now it just remove characters that's not ASCII (or so it seems)! What should I do?
I tried this approach:
sender page
Code:
string s = String.Format("infopage.aspx?Headline={0}&Infotext={1}&Buttontext={2}&Uri={3}",
    Server.UrlEncode("Booking udført"),    // Headline
    Server.UrlEncode("Din booking er nu registreret hos Prime."),    // Infotext
        Server.UrlEncode("Fortsæt..."),    // Buttontext
    Server.UrlEncode("bookings.aspx"));    // URI
Response.Redirect(s);
receiver page
Code:
lblHeadline.Text = Server.UrlDecode(Request.Params["Headline"]);
lblInfotext.Text = Server.UrlDecode(Request.Params["Infotext"]);
btnForward.Text =  Server.UrlDecode(Request.Params["Buttontext"]);
Thanks in advance.

 - mega
Moving to C# .NET
__________________
- mega
Aspiring JavaScript Ninja
 
Old May 16th, 2006, 12:46 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi mega,

Yes, you're right. Because of the new run-time compilation model, pages are compiled at run time, so you won't see a DLL anymore (although at run-time the pages are still compiled to separate DLL assemblies).

Also, because of the new model, you no longer need a separate control declaration in the code behind. This used to be necessary because the markup and the code behind where actually two different classes. With the new model, they are compiled together using partial classes. So, whenever you drop a new control on a page, you can automatically see in the code behind. What you see in the markup is what you actually have; no "lost" controls.

If you prefer the old model, take a look at Web Application Projects. You may also want to look at the new Web Deployment Project.

Does this help?

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
 
Old May 16th, 2006, 01:08 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 217
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to mega
Default

Yes, that clarifies a lot. Thanks.

Still a bit puzzled about event handling in 2.0 - I'll get back with a bunch of questions about that later... ;)
Anyway do you have any clue about why my special characters don’t convert correctly?

Regards, Jon.

 - mega
Moving to C# .NET
 
Old May 16th, 2006, 01:33 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

I am not sure if this will fix your problem, but you could take a look at this:

http://msdn.microsoft.com/library/de...ionsection.asp

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004





Similar Threads
Thread Thread Starter Forum Replies Last Post
Compiling Website to a DLL ashu_from_india .NET Framework 2.0 2 April 18th, 2008 05:20 AM
Dynamic website to Static website Aboal3ood ASP.NET 1.x and 2.0 Application Design 4 December 7th, 2006 11:46 AM
Install problems - VS 6.0 on XP SCRRUN.DLL PDM.DLL jeff4444 Visual C++ 0 December 6th, 2006 08:48 PM
Compiling the website into dll sunnyjassal General .NET 1 November 3rd, 2006 05:14 PM
DLL & Excel - keep having to reset DLL reference! James Diamond Pro VB 6 2 May 25th, 2004 03:37 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.