[RESOLVED] Export Complete Web Page to MS Excel

How do I export a complete web page to MS Excel?  Only the page content and not all content is in gridview.  Any thoughts?

By setting response content type you can achive this , something like this 

Response.ContentType = "application/force-download";
Response.AddHeader("content-disposition", "attachment; filename=Print.xls")

please have read this previous thread



xport a complete web page to MS Excel?



[RESOLVED] How to execute a statement

How to execute a statement that print the "Response Code" on a web page

string s1 = "Response.Write(\"Response Code:\");";

string S2= getPrint1(s1);
string getPrint1(string S)
    //How to execute a "Response.Write(\"Response Code:\");"; that print the message
    return "Success";



don't do it with Response.Write. ASP.NET offers server controls like the Literal or Label control to do so. Simply place it on your page and in the event of choice, for example Page_Load or a button click event state:

Literal1.Text = getPrint1("Success");

Grz, Kris.


string s1 = "Response.Write(\"Response Code:\");";

Do u wanna execute the "s1"?


such as sql statement support 

statement1 ="select * From table1";

execute statement1 

Maybe u have to use execute——a standard SQL command to execute a plain text

I understand your question, you got to go for Dynamic Compilation - http://simeonpilgrim.com/blog/2007/12/04/compiling-and-running-code-at-runtime/

PS - but it is not worth it in asp.net...



[RESOLVED] Asp.Net Office preview


I have the task of having to create a preview in jpg format of the first sheet of an excel file.

I tried using Open XML but you can extract an image only if it is checked save thumb option.

I have tried using office automation but, as reported by Microsoft itself, it is not advisable to use office automation from server code.

In fact, it works only under certain conditions (equal platform for example)

There is a safer way to create a preview in jpg format of a excel document (even better if it worked for word)



It seems diffculty to preview your excel file in jpg format. here a suggestion about using web browser to open it


[RESOLVED] How to insert data automatially to a website

Iam testing a website.there i need to create new user agina and again.any way to insert data and create user automatically?

Do it in the database directly via an INSERT command that you execute. 

You can generate random data and call the same function which saves user data in database with values.

If you want to submit form through code and there is no captcha in the page, check following:


i am not sure how you are testing, if you want to test UI, then there are tools like QTP, CodedUI to make the flow captured and re-run many number of times....

if you are talking about unit testing, then there are frameworks like MOQ for making a duplicate repository instead of going for actual database, so with little change you can test your work flow...


[RESOLVED] Update tfs workitem state and delivery date fields through c#


     how to update particular workitem state field to be closed and delivery date field updation through c#.



Could you give more info about your question. did you mean to write a passage of program using c# to operate the TFS updating the value of workitme state field and delivery date field? is that mean running the passage code to update the two field instead of manually update them? 

i want to update tfs workitem fields through programmatically.Now i,m able to update tfs fields programmatically but some times while updating workitem status it was showing user doesnot have permission.what might be the problem?

When i update tfs workitem state field through programmatically,sometimes in the history it will be displayed as

Edited(Completed to Closed) by User A on behalf of User B

why on behalf of is displaying?


Probably this is the right place to ask your questions -