DotNetNewsgroup.com  
web access to complete list of Microsoft.NET newsgroups
   home   |   control panel login   |   archive  |  
 
  carried group
academic
adonet
aspnet
aspnet.announcements
aspnet.buildingcontrols
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
assignment_manager
datatools
dotnet.distributed_apps
dotnet.general
dotnet.myservices
dotnet.nternationalization
dotnet.scripting
dotnet.security
dotnet.vjsharp
dotnet.vsa
dotnet.xml
dotnetfaqs
framework
framework.clr
framework.compactframework
framework.component_services
framework.controls
framework.databinding
framework.drawing
framework.enhancements
framework.interop
framework.odbcnet
framework.performance
framework.remoting
framework.sdk
framework.setup
framework.webservices
framework.windowsforms
framework.wmi
frwk.windowsforms.designtime
lang.csharp
lang.jscript
lang.vb
lang.vb.controls
lang.vb.data
lang.vb.upgrade
lang.vc
lang.vc.libraries
  
 
start date: Tue, 7 Aug 2007 08:08:54 -0500,    posted on: microsoft.public.dotnet.framework.aspnet        back       

Thread Index
  1    Brian
          2    Riki st


asp:LinkButton   
I have a page that contains an asp:LinkButton.  The purpose of this button 
is to allow the user to send the current page as an email.  My "plan" was 
to, in the click event handler of the LinkButton, store the html source for 
the current page in the viewstate and take the user to another page where 
they can type in the email address they would like the page sent to.  I 
guess my question is:

1) Is this the best way to do it?
2) How in the world do I access the HTML for the current page from code 
behind?

TIA

Brian
Date:Tue, 7 Aug 2007 08:08:54 -0500   Author:  

Re: asp:LinkButton   
"Brian"  wrote in message 
news:CD8AEA12-12F4-4A74-A2ED-A68838015B3D@microsoft.com...

>I have a page that contains an asp:LinkButton.  The purpose of this button 
>is to allow the user to send the current page as an email.  My "plan" was 
>to, in the click event handler of the LinkButton, store the html source for 
>the current page in the viewstate and take the user to another page where 
>they can type in the email address they would like the page sent to.  I 
>guess my question is:
>
> 1) Is this the best way to do it?
> 2) How in the world do I access the HTML for the current page from code 
> behind?


Usually, this is done with the RenderControl() function, which can render a 
control (or even a page) on any "surface", also in a mail.

But this would require you to reproduce the same content in a kind of user 
control, keeping state in the process.

I would suggest sending the mail in the same page, that would be much 
easier.
Try to move the content for the mail to a user control, that you can re-use 
both in the page and in the mail.

Group the controls for sending the mail in a panel that you can show and 
hide if you need to.

Riki
Date:Tue, 7 Aug 2007 16:28:58 +0200   Author:  

Google
 
Web dotnetnewsgroup.com


COPYRIGHT ?2005, EUROFRONT WORLDWIDE LTD., ALL RIGHT RESERVE  |   Contact us