Click here to Skip to main content
15,893,564 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: web api query - 401 error Pin
Bernhard Hiller8-Apr-14 22:18
Bernhard Hiller8-Apr-14 22:18 
GeneralRe: web api query - 401 error Pin
miss7868-Apr-14 23:57
miss7868-Apr-14 23:57 
GeneralRe: web api query - 401 error Pin
Bernhard Hiller9-Apr-14 2:19
Bernhard Hiller9-Apr-14 2:19 
GeneralRe: web api query - 401 error Pin
miss78614-Apr-14 6:24
miss78614-Apr-14 6:24 
QuestionHow to save secured password for individual users Pin
antony beula8-Apr-14 2:32
antony beula8-Apr-14 2:32 
AnswerRe: How to save secured password for individual users Pin
Peter Leow8-Apr-14 2:44
professionalPeter Leow8-Apr-14 2:44 
AnswerRe: How to save secured password for individual users Pin
Richard Deeming8-Apr-14 3:07
mveRichard Deeming8-Apr-14 3:07 
QuestionExporting Repeater values in to Excel Pin
indian1437-Apr-14 14:39
indian1437-Apr-14 14:39 
Hi All,

I am trying to write repeater values in to Excel file, it is writing something but it not writing clearly. Can anybody please help where am I doing mistake. Another problem is repeater control has text boxes and td values. Initially I couldn't write into excel because of text boxes then I did this work around but didn't give me the solution I want.
Here is my code:
protected void ExportToExcel(object sender, EventArgs e)
{
     Response.Clear();
     Response.Buffer = true;
     Response.ContentType = "application/vnd.ms-excel";
    Response.ContentEncoding = System.Text.Encoding.UTF7;
     Response.AddHeader("Content-Disposition", "attachment;filename=" + ConfigurationManager.AppSettings["ExcelFilePath"].ToString() +
       ddlProductId.Text + "_" + ddlProcessor.Text + ".xls");
     Response.Charset = "";
     this.EnableViewState = false;

     System.IO.StringWriter oStringWriter = new System.IO.StringWriter();
     System.Web.UI.HtmlTextWriter oHtmlTextWriter = new System.Web.UI.HtmlTextWriter(oStringWriter);

     HtmlForm frm = new HtmlForm();
     this.Page.Controls.Add(frm);
     frm.Attributes["runat"] = "server";
     frm.Controls.Add(this.rptMonthlyReport);
     frm.RenderControl(oHtmlTextWriter);
     rptMonthlyReport.RenderControl(oHtmlTextWriter);
     Response.Write(oStringWriter.ToString());
     Response.End();
}

public override void VerifyRenderingInServerForm(Control control)
{ /* Do nothing */ }

public override bool EnableEventValidation
{
    get { return false; }
    set { /* Do nothing */}
}

Then I have out put displayed as below. Please help me in this regard. Any help link or code snippet or a suggestion would help me a bit. Thanks in advance.

input type+AD0AIg-hidden+ACI- name+AD0AIgBfAF8-VIEWSTATE+ACI- id+AD0AIgBfAF8-VIEWSTATE+ACI- value+AD0AIgAi- /+AD4- +ADw-/div+AD4- +ADw-header+AD4- +ADw-span id+AD0AIg-rptMonthlyReport+AF8-Label3+ACI- class+AD0AIg-FormHead2+ACIAPg-Monthly Performance Report Tracking+ADw-/span+AD4- +ADw-/header+AD4- +ADw-table width+AD0AIg-100+ACUAIg- id+AD0AIg-tblMonthlyReport+ACI- cellspacing+AD0AIg-2+ACI- border+AD0AIg-1+ACIAPg- +ADw-tr+AD4- +ADw-td class+AD0AIg-ColHeading+ACIAPg-Recipient Agency+ADw-/td+AD4- +ADw-td class+AD0AIg-ColHeading+ACI- nowrap+AD0AIg-false+ACI- style+AD0AIg-width: 4+ACUAOwAiAD4- +ADw-span id+AD0AIg-rptMonthlyReport+AF8-lblCarryOverQty+ACI- class+AD0AIg-ColHeading+ACI- style+AD0AIg-display:inline-block+ADs-width:99+ACUAOwAiAD4-SY 2012-13+ADw-br /+AD4- Carry +ADw-br /+AD4-Over Pounds+ADw-/span+AD4APA-/td+AD4- +ADw-td class+AD0AIg-ColHeading+ACI- nowrap+AD0AIg-false+ACI- style+AD0AIg-width: 4+ACUAOwAiAD4- +ADw-span id+AD0AIg-rptMonthlyReport+AF8-lblDivertedQty+ACI- class+AD0AIg-ColHeading+ACI- style+AD0AIg-display:inline-block+ADs-width:99+ACUAOwAiAD4-Pounds +ADw-br /+AD4-Diverted for+ADw-br /+AD4-SY 2013-14+ADw-/span+AD4APA-/td+AD4- +ADw-td class+AD0AIg-ColHeading+ACI- nowrap+AD0AIg-true+ACI- style+AD0AIg-width: 4+ACUAIgA+-Jul+ADw-/td+AD4- +ADw-td class+AD0AIg-ColHeading+ACI- nowrap+AD0AIg-true+ACI- style+AD0AIg-width: 4+ACUAIgA+-Aug+ADw-/td+AD4- +ADw-td class+AD0AIg-ColHeading+ACI- nowrap+AD0AIg-true+ACI- style+AD0AIg-width: 4+ACUAIgA+-Sep+ADw-/td+AD4- +ADw-td class+AD0AIg-ColHeading+ACI- nowrap+AD0AIg-true+ACI- style+AD0AIg-width: 4+ACUAIgA+-Oct+ADw-/td+AD4- +ADw-td class+AD0AIg-ColHeading+ACI- nowrap+AD0AIg-true+ACI- style+AD0AIg-width: 4+ACUAIgA+-Nov+ADw-/td+AD4- +ADw-td class+AD0AIg-ColHeading+ACI- nowrap+AD0AIg-true+ACI- style+AD0AIg-width: 4+ACUAIgA+-Dec+ADw-/td+AD4- +ADw-td class+AD0AIg-ColHeading+ACI- nowrap+AD0AIg-true+ACI- style+AD0AIg-width: 4+ACUAIgA+-Jan+ADw-/td+AD4- +ADw-td class+AD0AIg-ColHeading+ACI- nowrap+AD0AIg-true+ACI- style+AD0AIg-width: 4+ACUAIgA+-Feb+ADw-/td+AD4- +ADw-td class+AD0AIg-ColHeading+ACI- nowrap+AD0AIg-true+ACI- style+AD0AIg-width: 4+ACUAIgA+-Mar+ADw-/td+AD4- +ADw-td class+AD0AIg-ColHeading+ACI- nowrap+AD0AIg-true+ACI- style+AD0AIg-width: 4+ACUAIgA+-Apr+ADw-/td+AD4- +ADw-td class+AD0AIg-ColHeading+ACI- nowrap+AD0AIg-true+ACI- style+AD0AIg-width: 4+ACUAIgA+-May+ADw-/td+AD4- +ADw-td class+AD0AIg-ColHeading+ACI- nowrap+AD0AIg-true+ACI- style+AD0AIg-width: 4+ACUAIgA+-Jun+ADw-/td+AD4- +ADw-td class+AD0AIg-ColHeading+ACI- style+AD0AIg-width: 6+ACUAOw- flex-wrap: wrap+ADsAIgA+-Qty Trans Frm Sponr To State+ADw-/td+AD4- +ADw-td class+AD0AIg-ColHeading+ACI- style+AD0AIg-width: 6+ACUAOw- flex-wrap: wrap+ADsAIgA+-Qty Trans Frm State To Sponr+ADw-/td+AD4- +ADw-td class+AD0AIg-ColHeading+ACI- style+AD0AIg-width: 6+ACUAOw- flex-wrap: wrap+ADsAIgA+-Qty Trans Frm Sponr To Sponr+ADw-/td+AD4- +ADw-td class+AD0AIg-ColHeading+ACI- nowrap+AD0AIg-false+ACI- style+AD0AIg-width: 4+ACUAIgA+-Total+ADw-/td+AD4- +ADw-td class+AD0AIg-ColHeading+ACI- style+AD0AIg-width: 4+ACUAOw- flex-wrap: wrap+ADsAIgA+-Prior Yr Left Over+ADw-/td+AD4- +ADw-td class+AD0AIg-ColHeading+ACI- style+AD0AIg-width: 2+ACUAOw- flex-wrap: wrap+ADsAIgA+-Ext Ind+ADw-/td+AD4- +ADw-/tr+AD4- +ADw-tr class+AD0AIg-OddRow+ACI- width+AD0AIg-95+ACUAIgA+- +ADw-td align+AD0AIg-left+ACI- style+AD0AIg-border: none+ADsAIgA+- +ADw-input name+AD0AIg-rptMonthlyReport+ACQ-ctl16+ACQ-Hidden1+ACI- type+AD0AIg-hidden+ACI- id+AD0AIg-rptMonthlyReport+AF8-Hidden1+AF8-0+ACI- value+AD0AIg-10001+ACI- /+AD4- Baker SD 5J +ADw-/td+AD4- +ADw-td id+AD0AIg-rptMonthlyReport+AF8-tdCarryOverQty+AF8-0+ACI- align+AD0AIg-right+ACI- style+AD0AIg-width: 4+ACUAIgA+- +ADw-input name+AD0AIg-rptMonthlyReport+ACQ-ctl16+ACQ-txtCarryOverQty+ACI- type+AD0AIg-text+ACI- value+AD0AIg-0.00+ACI- id+AD0AIg-

Thanks & Regards,

Abdul Aleem Mohammad
St Louis MO - USA

AnswerRe: Exporting Repeater values in to Excel Pin
Schatak8-Apr-14 2:24
professionalSchatak8-Apr-14 2:24 
GeneralRe: Exporting Repeater values in to Excel Pin
indian1438-Apr-14 7:08
indian1438-Apr-14 7:08 
GeneralRe: Exporting Repeater values in to Excel Pin
Schatak8-Apr-14 21:18
professionalSchatak8-Apr-14 21:18 
GeneralRe: Exporting Repeater values in to Excel Pin
indian1439-Apr-14 7:33
indian1439-Apr-14 7:33 
GeneralRe: Exporting Repeater values in to Excel Pin
Schatak10-Apr-14 2:08
professionalSchatak10-Apr-14 2:08 
GeneralRe: Exporting Repeater values in to Excel Pin
indian14310-Apr-14 6:31
indian14310-Apr-14 6:31 
GeneralRe: Exporting Repeater values in to Excel Pin
indian14310-Apr-14 6:58
indian14310-Apr-14 6:58 
QuestionTFS build error Pin
indian1437-Apr-14 8:55
indian1437-Apr-14 8:55 
QuestionImage galleries Pin
Keith888887-Apr-14 5:53
Keith888887-Apr-14 5:53 
QuestionAntiForgeryToken after session timeout Pin
littleGreenDude7-Apr-14 5:30
littleGreenDude7-Apr-14 5:30 
QuestionSystem.Web.UI.DataVisualization.Charting Pin
NickKa6-Apr-14 3:45
NickKa6-Apr-14 3:45 
SuggestionRe: System.Web.UI.DataVisualization.Charting Pin
thatraja9-Apr-14 2:18
professionalthatraja9-Apr-14 2:18 
QuestionPossibility of having several pages open. aspx in internet explorer in my application web .net 2013? Pin
Carlos j. Ramirez5-Apr-14 9:56
Carlos j. Ramirez5-Apr-14 9:56 
AnswerRe: Possibility of having several pages open. aspx in internet explorer in my application web .net 2013? Pin
Philippe Mori5-Apr-14 12:00
Philippe Mori5-Apr-14 12:00 
GeneralRe: Possibility of having several pages open. aspx in internet explorer in my application web .net 2013? Pin
Carlos j. Ramirez7-Apr-14 4:58
Carlos j. Ramirez7-Apr-14 4:58 
QuestionHow to use http://flexpaper.devaldi.com/ to share PDF file on web page Pin
bipinprem155-Apr-14 9:17
bipinprem155-Apr-14 9:17 
QuestionRe: How to use http://flexpaper.devaldi.com/ to share PDF file on web page Pin
Richard MacCutchan5-Apr-14 21:37
mveRichard MacCutchan5-Apr-14 21:37 

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.