Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / .NET SDK / May 2006

Tip: Looking for answers? Try searching our database.

link to dynamically built page

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
David Thielen - 06 May 2006 02:31 GMT
Hi;

I need to have a url that when the user goes to it, it builds the page
programatically. In one case the file is a blob in the database so I need to
read and return it. In the other case I create the document (a report) when
it is requested.

How can I do this? (I had this all working - and then deleted the code -
aaargh!)

Signature

thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

Steven Cheng[MSFT] - 08 May 2006 05:03 GMT
Hi Dave,

Thank you for posting.

As for the clicking on a hyperlink on the web page, it is a pure
client-side operation, and the redirecting request to the server is also
sent by the client-browser, so it is hard to intercept such click and
redirecting at server-side code. IMO, you can consider use a Linkbutton
instead of hyperlink. Thus, we can put the dynamic page's creation code in
the LinkButton's postback event(server-side), and do the redirection after
the dynamic page been created.. How do you think of this?

Regards,

Steven Cheng
Microsoft Online Community Support

==================================================

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

Signature

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

David Thielen - 08 May 2006 05:59 GMT
Hello;

I think you misunderstood my question. Lets say I have a url
http://www.windward.net/site/page.aspx - I don't have a page.aspx file - I
have a pdf file as a blob in a sql database. I need to return that file as
the page when the user requests page.aspx.

How do I do this?

Signature

thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

> Hi Dave,
>
[quoted text clipped - 25 lines]
> (This posting is provided "AS IS", with no warranties, and confers no
> rights.)
Steven Cheng[MSFT] - 08 May 2006 11:15 GMT
Thanks for your quick response Dave,

Well, I understand what you're doing is actually somewhat like url resource
redirecting, redirect one kind of url to another kind of resource, correct?

I assumed that you've correctly configured the IIS server so that the url
to a non-existing document will also be forward to aspnet engine.  Then, in
ASP.NET side, you can consider use httpmodule to do the redirecting work.
You can check the original url of the request and determine what to do
next, you can:

1. You can call method to creating temp file and use Rewrite API to
redirect the request context to the new created file.

or

2. you can even directly write our binary stream into the response stream
an close the response.

Here are some articles on ASP.NET url rewriting and httpmodule:

#URL Rewriting in ASP.NET
http://msdn.microsoft.com/library/en-us/dnaspp/html/urlrewriting.asp?frame=t
rue

#How to: Create and Configure an HTTP Module  
http://msdn2.microsoft.com/en-us/library/tfd6k449.aspx

Also, the below article is a good one for getting the underlying
architecture of the ASP.NET (from IIS to ASP.NET pipeline):

#A low-level Look at the ASP.NET Architecture
http://www.west-wind.com/presentations/howaspnetworks/howaspnetworks.asp

Hope this helps.

Regards,

Steven Cheng
Microsoft Online Community Support

==================================================

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

Signature

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

David Thielen - 08 May 2006 17:00 GMT
bingo - thanks

Signature

thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

> Thanks for your quick response Dave,
>
[quoted text clipped - 49 lines]
> (This posting is provided "AS IS", with no warranties, and confers no
> rights.)
Steven Cheng[MSFT] - 09 May 2006 05:45 GMT
You're welcome Dave.

Regards,

Steven Cheng
Microsoft Online Community Support

==================================================

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

Signature

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.