Click here to Skip to main content
15,851,242 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionHow to apply stylesheet class in EMail HTML format Pin
Deepml12-Mar-09 20:17
Deepml12-Mar-09 20:17 
AnswerRe: How to apply stylesheet class in EMail HTML format Pin
Abhijit Jana12-Mar-09 20:32
professionalAbhijit Jana12-Mar-09 20:32 
GeneralRe: How to apply stylesheet class in EMail HTML format Pin
Deepml12-Mar-09 20:45
Deepml12-Mar-09 20:45 
GeneralRe: How to apply stylesheet class in EMail HTML format Pin
Abhijit Jana12-Mar-09 21:24
professionalAbhijit Jana12-Mar-09 21:24 
GeneralRe: How to apply stylesheet class in EMail HTML format Pin
Deepml12-Mar-09 21:37
Deepml12-Mar-09 21:37 
GeneralRe: How to apply stylesheet class in EMail HTML format Pin
Abhijit Jana12-Mar-09 21:39
professionalAbhijit Jana12-Mar-09 21:39 
QuestionDataGrid to Excel Pin
rakeshs31212-Mar-09 19:34
rakeshs31212-Mar-09 19:34 
AnswerRe: DataGrid to Excel Pin
kumar_k50812-Mar-09 21:15
kumar_k50812-Mar-09 21:15 
Hi,

You can use this code,it directly exports only the current records of the page


Response.ClearContent()
             Response.AddHeader("content-disposition", "attachment;filename="&  Your File Name  & ".xls")
        Response.Charset = ""
        Response.ContentType = "application/vnd.xls"
        Dim stringWriter As New System.IO.StringWriter()
        Dim htmlWrite As New System.Web.UI.HtmlTextWriter(stringWriter)
'dgview is your datagrid
        dgview.AllowPaging = true
        dgview.DataSource = Your Data Source 
        dgview.DataBind()
        dgview.RenderControl(htmlWrite)
        Response.Write(stringWriter.ToString())
        Response.End()


and also you can apply some styles for excel sheet....


Hope this will help you... Thumbs Up | :thumbsup:

S Kumar

GeneralRe: DataGrid to Excel Pin
rakeshs31212-Mar-09 22:43
rakeshs31212-Mar-09 22:43 
AnswerRe: DataGrid to Excel [modified] Pin
kumar_k50813-Mar-09 0:02
kumar_k50813-Mar-09 0:02 
Questionproblem with xsd serialization Pin
prasadbuddhika12-Mar-09 19:19
prasadbuddhika12-Mar-09 19:19 
AnswerRe: problem with xsd serialization Pin
Expert Coming12-Mar-09 19:28
Expert Coming12-Mar-09 19:28 
GeneralRe: problem with xsd serialization Pin
prasadbuddhika12-Mar-09 19:38
prasadbuddhika12-Mar-09 19:38 
GeneralRe: problem with xsd serialization Pin
Expert Coming12-Mar-09 19:41
Expert Coming12-Mar-09 19:41 
GeneralRe: problem with xsd serialization Pin
prasadbuddhika12-Mar-09 20:05
prasadbuddhika12-Mar-09 20:05 
QuestionNo takers on Accordion problem??? Pin
Clay Aldebol12-Mar-09 15:49
Clay Aldebol12-Mar-09 15:49 
AnswerRe: No takers on Accordion problem??? Pin
Expert Coming12-Mar-09 19:26
Expert Coming12-Mar-09 19:26 
GeneralRe: No takers on Accordion problem??? Pin
Clay Aldebol13-Mar-09 4:18
Clay Aldebol13-Mar-09 4:18 
AnswerRe: No takers on Accordion problem??? Pin
Clay Aldebol16-Mar-09 9:24
Clay Aldebol16-Mar-09 9:24 
AnswerRe: No takers on Accordion problem??? Pin
Clay Aldebol16-Mar-09 10:14
Clay Aldebol16-Mar-09 10:14 
QuestionFileUpload Pin
Illegal Operation12-Mar-09 15:04
Illegal Operation12-Mar-09 15:04 
AnswerRe: FileUpload Pin
Christian Graus12-Mar-09 16:01
protectorChristian Graus12-Mar-09 16:01 
AnswerRe: FileUpload Pin
Yusuf12-Mar-09 17:50
Yusuf12-Mar-09 17:50 
QuestionDisable a button a web form. Pin
AndieDu12-Mar-09 14:39
AndieDu12-Mar-09 14:39 
AnswerRe: Disable a button a web form. Pin
johnsontroye12-Mar-09 14:43
johnsontroye12-Mar-09 14:43 

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.