Click here to Skip to main content
16,006,442 members
Home / Discussions / C#
   

C#

 
GeneralRe: Is there an #define for the compiler version? Pin
Marc Clifton26-May-04 3:25
mvaMarc Clifton26-May-04 3:25 
GeneralRe: Is there an #define for the compiler version? Pin
Heath Stewart26-May-04 4:23
protectorHeath Stewart26-May-04 4:23 
GeneralTooltips Pin
Joel Holdsworth25-May-04 10:11
Joel Holdsworth25-May-04 10:11 
GeneralRe: Tooltips Pin
Heath Stewart25-May-04 10:37
protectorHeath Stewart25-May-04 10:37 
GeneralRe: Tooltips Pin
Heath Stewart25-May-04 11:25
protectorHeath Stewart25-May-04 11:25 
Generaladding dataset to webform generating error Pin
DeSonny25-May-04 10:00
DeSonny25-May-04 10:00 
GeneralWrite DataGrid to file. Pin
Jason Weibel25-May-04 9:28
Jason Weibel25-May-04 9:28 
GeneralRe: Write DataGrid to file. Pin
Heath Stewart25-May-04 9:57
protectorHeath Stewart25-May-04 9:57 
The rendering methods for the DataGrid web control (as well as all other web controls) use an HtmlTextWriter. You could extend that class and provide your own that could optionally write to a file in addition to the response stream. This forces you to call the render methods in ASP.NET, however, so you'll probably want to define an IHttpHandler and associate that with a different extension Type that does what the PageHandlerFactory (for .aspx files) would normally do.

MSDN had a recent write-up on .Text (a .NET blogger) that may help. Read Serve Dynamic Content with HTTP Handlers[^] for more information.

Another option is to define a handler (like above) or an .ashx file (by default, a simple handler that must implement IHttpHandler) that grabs the data for a DataGrid and calls RenderControl to an HtmlTextWriter created using the response stream. Then just save this file to disk. This wouldn't have any other page data - just the DataGrid output.

 

Microsoft MVP, Visual C#
My Articles
GeneralWisdom of deriving a control from Panel Pin
Joel Holdsworth25-May-04 9:08
Joel Holdsworth25-May-04 9:08 
GeneralRe: Wisdom of deriving a control from Panel Pin
ekolis25-May-04 9:19
ekolis25-May-04 9:19 
Generalhmm Pin
Joel Holdsworth25-May-04 9:51
Joel Holdsworth25-May-04 9:51 
GeneralRe: Wisdom of deriving a control from Panel Pin
Heath Stewart25-May-04 10:11
protectorHeath Stewart25-May-04 10:11 
GeneralRe: Wisdom of deriving a control from Panel Pin
Joel Holdsworth25-May-04 10:15
Joel Holdsworth25-May-04 10:15 
GeneralRe: Wisdom of deriving a control from Panel Pin
Joel Holdsworth25-May-04 10:29
Joel Holdsworth25-May-04 10:29 
GeneralDisplay an install date and a print date. Pin
kornstyle25-May-04 9:01
kornstyle25-May-04 9:01 
GeneralRe: Display an install date and a print date. Pin
Heath Stewart25-May-04 9:49
protectorHeath Stewart25-May-04 9:49 
GeneralRe: Display an install date and a print date. Pin
kornstyle25-May-04 11:03
kornstyle25-May-04 11:03 
QuestionCan I send mouse clicks to another application? Pin
ekolis25-May-04 8:52
ekolis25-May-04 8:52 
AnswerRe: Can I send mouse clicks to another application? Pin
Heath Stewart25-May-04 9:43
protectorHeath Stewart25-May-04 9:43 
GeneralRe: Can I send mouse clicks to another application? Pin
ekolis25-May-04 15:05
ekolis25-May-04 15:05 
GeneralRe: Can I send mouse clicks to another application? Pin
Dave Kreskowiak25-May-04 17:14
mveDave Kreskowiak25-May-04 17:14 
GeneralRe: Can I send mouse clicks to another application? Pin
Heath Stewart26-May-04 2:57
protectorHeath Stewart26-May-04 2:57 
GeneralInterop with MSDev 6.0 running instanceS Pin
Eric Marchesin25-May-04 8:52
Eric Marchesin25-May-04 8:52 
GeneralRe: Interop with MSDev 6.0 running instanceS Pin
Heath Stewart25-May-04 10:36
protectorHeath Stewart25-May-04 10:36 
GeneralRe: Interop with MSDev 6.0 running instanceS Pin
Eric Marchesin25-May-04 11:15
Eric Marchesin25-May-04 11:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.