473,387 Members | 1,541 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Rendering a usercontrol to obtain html output in webservice

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.
Nov 19 '05 #1
0 1066

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Owen Blacker | last post by:
An awkward question. In a CMS-like environment, I have a list of items that is generated on the serverside using an XmlDocument to throw together XHTML tags (mainly because it's substantially...
0
by: threecrans | last post by:
If you create a new server control, and override the Render method with the following code: protected override void Render(HtmlTextWriter output) { // <TABLE id="mytable">...
4
by: Mat | last post by:
Hi, I am having a bit of a problem trying to access / set properties of a usercontrol from the parent codebehind. This is what I have so far.. simple.aspx <%@ Page...
4
by: Nacho Nachev | last post by:
Hello, AFIAK ASP.NET (1.1) uses a technology called 'Adpative Rendering' to output HTML that is compliant with the client browser or at least stick to HTML 4 specification or IE. This seems...
5
by: Dave A | last post by:
I am writing an ASP.NET tool that will allow the client to create their own online froms. ie the client can add tect boxes, text, drop downs,etc with absolutely no technical skill what so ever....
12
by: Joe | last post by:
Hello All: Do I have to use the LoadControl method of the Page to load a UserControl? I have a class which contains three methods (one public and two private). The class acts as a control...
5
by: paul.hester | last post by:
Hi all, I have a custom control with an overridden Render method. Inside this method I'm rendering each control in its collection using their RenderControl method. However, I'm running into a...
1
by: =?Utf-8?B?TUNN?= | last post by:
Is it possible to have .NET controls render as HTML 4.01 Strict compliant? In web.config, there is xhtml conformance, but that does not provide an option for HTML 4.01.
1
by: sandeepdhankar10 | last post by:
hi experts.... i need ur help again... i am creating a usercontrol that fetch images from webservice and show in a picture box.. (This is my Activex control as i say). and build it. now i have...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.