Click here to Skip to main content
15,906,816 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: No parameterless constructor defined for this object. Pin
Pete O'Hanlon11-Sep-07 5:14
mvePete O'Hanlon11-Sep-07 5:14 
AnswerRe: No parameterless constructor defined for this object. Pin
ToddHileHoffer11-Sep-07 5:29
ToddHileHoffer11-Sep-07 5:29 
GeneralRe: No parameterless constructor defined for this object. [modified] Pin
firestoper11-Sep-07 6:18
firestoper11-Sep-07 6:18 
GeneralRe: No parameterless constructor defined for this object. Pin
StylezHouse11-Sep-07 7:43
StylezHouse11-Sep-07 7:43 
GeneralRe: No parameterless constructor defined for this object. Pin
firestoper11-Sep-07 14:35
firestoper11-Sep-07 14:35 
QuestionRegisterStartupScript Pin
Rev T11-Sep-07 3:52
Rev T11-Sep-07 3:52 
AnswerRe: RegisterStartupScript Pin
Sandeep Akhare11-Sep-07 3:57
Sandeep Akhare11-Sep-07 3:57 
QuestionHow to save file with some default name without prompting user Pin
here2learn11-Sep-07 2:44
here2learn11-Sep-07 2:44 
Hi all,

i have a page with a button on it, onclick of button i need to get a string data from database and need to write that to a word file. my code is like this:-

1) function:- i am calling this function on button click event after getting my data from database, suppose data is a string "someString".

i am bound to use this approach only because of some specific requirements(can't use word file writing with word application and document object...)

private void html2word(string someString)
{
HttpContext.Current.Response.Clear();
HttpContext.Current.Response.ClearContent();
HttpContext.Current.Response.ClearHeaders();
HttpContext.Current.Response.Buffer = true;
HttpContext.Current.Response.ContentType = "application/msword";
HttpContext.Current.Response.Write(@"");
HttpContext.Current.Response.AddHeader("Content-Disposition", "attachment;filename='InvDetails.doc'");
HttpContext.Current.Response.Charset = "utf-8"; //UTF8
HttpContext.Current.Response.ContentEncoding = System.Text.Encoding.GetEncoding("windows-1250"); //windows-1250

HttpContext.Current.Response.Write("

");
HttpContext.Current.Response.Write(someString); HttpContext.Current.Response.Write("

");
return HttpContext.Current.Response;

// this flush() line of code will ask user to open or save a word file, here only i want to save this file without prompting the user, as this file is going to be deleted after some operation and hence user should not know that it is created... how can we do this D'Oh! | :doh:

HttpContext.Current.Response.Flush();
HttpContext.Current.Response.End();

}

People often say that motivation doesn't last. Well, neither does bathing - that's why we recommend it daily
Akhilesh Singh

QuestionCookies and Session.Abandon() Pin
varshavmane11-Sep-07 2:40
varshavmane11-Sep-07 2:40 
AnswerRe: Cookies and Session.Abandon() Pin
Sandeep Akhare11-Sep-07 3:24
Sandeep Akhare11-Sep-07 3:24 
GeneralRe: Cookies and Session.Abandon() Pin
varshavmane11-Sep-07 3:35
varshavmane11-Sep-07 3:35 
AnswerRe: Cookies and Session.Abandon() Pin
Ahmad Adnan11-Sep-07 3:25
Ahmad Adnan11-Sep-07 3:25 
QuestionConfirmation box onload Pin
munklefish11-Sep-07 1:21
munklefish11-Sep-07 1:21 
AnswerRe: Confirmation box onload Pin
Sandeep Akhare11-Sep-07 1:51
Sandeep Akhare11-Sep-07 1:51 
GeneralRe: Confirmation box onload Pin
munklefish11-Sep-07 2:16
munklefish11-Sep-07 2:16 
GeneralRe: Confirmation box onload Pin
Sandeep Akhare11-Sep-07 2:48
Sandeep Akhare11-Sep-07 2:48 
GeneralRe: Confirmation box onload Pin
munklefish11-Sep-07 3:08
munklefish11-Sep-07 3:08 
GeneralRe: Confirmation box onload Pin
Sandeep Akhare11-Sep-07 3:14
Sandeep Akhare11-Sep-07 3:14 
Questiondisplay video in browser Pin
Khawar Abbas111-Sep-07 0:58
Khawar Abbas111-Sep-07 0:58 
AnswerRe: display video in browser Pin
SHatchard11-Sep-07 1:02
SHatchard11-Sep-07 1:02 
AnswerRe: display video in browser Pin
munklefish11-Sep-07 1:28
munklefish11-Sep-07 1:28 
QuestionA4 page size and Image Pin
AnhTin11-Sep-07 0:18
AnhTin11-Sep-07 0:18 
AnswerRe: A4 page size and Image Pin
Christian Graus11-Sep-07 0:24
protectorChristian Graus11-Sep-07 0:24 
GeneralRe: A4 page size and Image Pin
AnhTin13-Sep-07 0:55
AnhTin13-Sep-07 0:55 
Questionimage problem Pin
saravanan0511-Sep-07 0:12
saravanan0511-Sep-07 0:12 

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.