Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Services > Rendering a usercontrol to obtain html output in webservice

Reply
Thread Tools

Rendering a usercontrol to obtain html output in webservice

 
 
Choi Han Choong
Guest
Posts: n/a
 
      08-18-2005
Hi,
Would like to know if what I am trying to do is possible.

I have a usercontrol(ascx) that basically contains a datagrid.

I would like to save the output of this usercontrol to a file when a
webservice method is called.

I tried with the following but it does not seems to work. Nothing is
rendered.

Dim tw As New System.IO.StringWriter
Dim hw As New System.Web.UI.HtmlTextWriter(tw)

Dim uc as New UserControl
uc.LoadControl("~/Controls/Report.ascx")

uc.RenderControl( hw)

Return tw.ToString


It seems the datagrid is not init or loaded. Even if I called
uc.BindData before call to render, the grid does not seems to get init.

Is what I am trying to do possible? If not any other way to get what I
wanted to do?

Thanks.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Page html output not completely rendering =?Utf-8?B?QnJpYW4gU3RhbmZvcnRo?= ASP .Net 1 02-07-2006 04:23 AM
IE6 SP1 rendering vs IE6 SP2 rendering Peter Mount HTML 4 01-31-2006 08:01 AM
Rendering a usercontrol to obtain html output in webservice Choi Han Choong ASP .Net 0 08-18-2005 05:55 AM
Rendering a usercontrol to obtain html output in webservice Choi Han Choong ASP .Net Web Controls 0 08-18-2005 05:55 AM
Usercontrol derived from Usercontrol without double Html Code Reik ASP .Net Web Controls 1 04-12-2005 04:34 PM



Advertisments