Click here to Skip to main content
15,925,133 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: How to Deploy.. Pin
eyeseetee18-Apr-08 3:11
eyeseetee18-Apr-08 3:11 
Questionscript callBack not work in mozilla Pin
manisha15apr18-Apr-08 2:46
manisha15apr18-Apr-08 2:46 
GeneralRe: script callBack not work in mozilla Pin
eyeseetee18-Apr-08 3:09
eyeseetee18-Apr-08 3:09 
QuestionHow to get value from inputbox [modified] Pin
sjs4u18-Apr-08 2:46
sjs4u18-Apr-08 2:46 
AnswerRe: How to get value from inputbox Pin
eyeseetee18-Apr-08 3:07
eyeseetee18-Apr-08 3:07 
GeneralRe: How to get value from inputbox Pin
sjs4u18-Apr-08 3:12
sjs4u18-Apr-08 3:12 
GeneralRe: How to get value from inputbox Pin
J4amieC18-Apr-08 3:56
J4amieC18-Apr-08 3:56 
GeneralProblem in open excel file Pin
Vinay Dornala18-Apr-08 2:13
Vinay Dornala18-Apr-08 2:13 
Hi friends,

Iam facing problem in opening excel file without saving into disk,

Iam exporting gridview data into excel file it working file , when i open file it given missing file error,

Here is the error details , can pls give suggesition why it is happening, i understood that it is because of fully qulified path missing for .CSS file in application.


missing file: c\path\style.css like.

here is code that i was written by me

Private Sub ExportToExcel(ByVal gvInput As GridView)
Dim Counter As Integer

Dim dtExcel As New DataTable
'Dim dr As DataRow
Dim ColNameArray As New ArrayList
Dim ColPosArray As New ArrayList
For Counter = 0 To gvInput.Columns.Count - 1
If gvInput.Columns(Counter).Visible Then
ColNameArray.Add(gvInput.Columns(Counter).HeaderText)
ColPosArray.Add(Counter)
End If
Next

For Counter = 0 To ColNameArray.Count - 1
dtExcel.Columns.Add(ColNameArray(Counter))
Next

Dim gvRow As GridViewRow
Dim dr As DataRow
For Each gvRow In gvInput.Rows
dr = dtExcel.NewRow
For Counter = 0 To ColNameArray.Count - 1
'gvRow.
If gvRow.Cells(ColPosArray(Counter)).HasControls Then
dr(ColNameArray(Counter)) = CType(gvRow.Cells(ColPosArray(Counter)).Controls(0), LinkButton).Text
Else
dr(ColNameArray(Counter)) = gvRow.Cells(ColPosArray(Counter)).Text
End If
Next
dtExcel.Rows.Add(dr)
Next
Dim gvExportExcel As New GridView
gvExportExcel.DataSource = dtExcel
gvExportExcel.DataBind()

Response.Clear()
Response.Buffer = True
Response.ContentType = "application/vnd.ms-excel"
Response.AddHeader("Content-Disposition", "attachment; filename=" & Now() & ".xls")
Response.Charset = ""
Me.EnableViewState = False
Dim oStringWriter As New System.IO.StringWriter()
Dim oHtmlTextWriter As New System.Web.UI.HtmlTextWriter(oStringWriter)
'Me.ClearControls(gv)
gvExportExcel.RenderControl(oHtmlTextWriter)
Response.Write(oStringWriter.ToString())
Response.End()
End Sub


Thanks in Advance,
Generalsample coding for saving incoming mails from mail inbox Pin
sanvishal18-Apr-08 1:55
sanvishal18-Apr-08 1:55 
GeneralRe: sample coding for saving incoming mails from mail inbox Pin
Vasudevan Deepak Kumar18-Apr-08 1:58
Vasudevan Deepak Kumar18-Apr-08 1:58 
Questionhow to make the Set up of windows Services Pin
Piyush Vardhan Singh18-Apr-08 1:29
Piyush Vardhan Singh18-Apr-08 1:29 
AnswerRe: how to make the Set up of windows Services Pin
Parwej Ahamad18-Apr-08 1:35
professionalParwej Ahamad18-Apr-08 1:35 
GeneralRe: how to make the Set up of windows Services Pin
Piyush Vardhan Singh18-Apr-08 1:38
Piyush Vardhan Singh18-Apr-08 1:38 
GeneralRe: how to make the Set up of windows Services Pin
Parwej Ahamad18-Apr-08 1:43
professionalParwej Ahamad18-Apr-08 1:43 
GeneralRe: how to make the Set up of windows Services Pin
Piyush Vardhan Singh18-Apr-08 2:31
Piyush Vardhan Singh18-Apr-08 2:31 
GeneralRe: how to make the Set up of windows Services Pin
Parwej Ahamad18-Apr-08 8:01
professionalParwej Ahamad18-Apr-08 8:01 
QuestionDirect Dowloading file from webserver? Pin
r aa j18-Apr-08 0:56
r aa j18-Apr-08 0:56 
AnswerRe: Direct Dowloading file from webserver? Pin
Eduard Keilholz18-Apr-08 1:24
Eduard Keilholz18-Apr-08 1:24 
GeneralRe: Direct Dowloading file from webserver? Pin
r aa j18-Apr-08 1:35
r aa j18-Apr-08 1:35 
AnswerRe: Direct Dowloading file from webserver? Pin
Vasudevan Deepak Kumar18-Apr-08 1:46
Vasudevan Deepak Kumar18-Apr-08 1:46 
GeneralJavascript Error Pin
samerh18-Apr-08 0:08
samerh18-Apr-08 0:08 
GeneralRe: Javascript Error Pin
Christian Graus18-Apr-08 0:36
protectorChristian Graus18-Apr-08 0:36 
GeneralRe: Javascript Error Pin
samerh18-Apr-08 1:06
samerh18-Apr-08 1:06 
GeneralRe: Javascript Error Pin
Sankar Komma 18-Apr-08 1:33
Sankar Komma 18-Apr-08 1:33 
GeneralRe: Javascript Error Pin
J a a n s18-Apr-08 1:22
professionalJ a a n s18-Apr-08 1:22 

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.