Click here to Skip to main content
15,888,521 members
Home / Discussions / ASP.NET
   

ASP.NET

 
Questionlinkbutton in gridview Pin
vikas shukla8-Jul-09 20:20
vikas shukla8-Jul-09 20:20 
AnswerRe: linkbutton in gridview Pin
Abhijit Jana8-Jul-09 20:49
professionalAbhijit Jana8-Jul-09 20:49 
Questiongadget concept how to do plz give me some idea Pin
Member 38798818-Jul-09 20:15
Member 38798818-Jul-09 20:15 
Questionplz tell me,how to compare zero value with image control url Pin
nari08208-Jul-09 20:13
nari08208-Jul-09 20:13 
AnswerRe: plz tell me,how to compare zero value with image control url Pin
Abhijit Jana8-Jul-09 20:19
professionalAbhijit Jana8-Jul-09 20:19 
QuestionPlease help with Data Grid export problem Pin
Hammad Mansoor8-Jul-09 20:03
Hammad Mansoor8-Jul-09 20:03 
AnswerRe: Please help with Data Grid export problem Pin
Abhijit Jana8-Jul-09 20:51
professionalAbhijit Jana8-Jul-09 20:51 
GeneralRe: Please help with Data Grid export problem Pin
Hammad Mansoor8-Jul-09 21:06
Hammad Mansoor8-Jul-09 21:06 
Ok I have changed my code. I think it should work, But it isn't. Any suggestions? Please check my code below.

Imports System.Data
Imports System.IO

Partial Class _Default
Inherits System.Web.UI.Page

Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
End Sub

Protected Sub Button2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim style As String = "<style> .text { mso-number-format:\@; } </style> "
Response.ClearContent()
Response.AddHeader("content-disposition", "attachment; filename=MyExcelFile.xls")
Response.ContentType = "application/excel"
GridView1.AllowPaging = False
Dim sw As New StringWriter()
Dim htw As New HtmlTextWriter(sw)
GridView1.DataBind()
GridView1.RenderControl(htw)
'Style is added dynamically
Response.Write(style)
Response.Write(sw.ToString())
Response.End()


End Sub

Public Overloads Overrides Sub VerifyRenderingInServerForm(ByVal control As Control)

End Sub

Protected Sub GridView1_RowDataBound(ByVal sender As Object, ByVal e As GridViewRowEventArgs)
If e.Row.RowType = DataControlRowType.DataRow Then
e.Row.Cells(0).Attributes.Add("class", "text")
End If
End Sub

End Class
AnswerRe: Please help with Data Grid export problem [modified] Pin
kumar_k5088-Jul-09 22:22
kumar_k5088-Jul-09 22:22 
GeneralRe: Please help with Data Grid export problem Pin
Hammad Mansoor9-Jul-09 18:46
Hammad Mansoor9-Jul-09 18:46 
Questionajax page request.forms using post method...,values inserting into db 2 times?..., Pin
Member 38798818-Jul-09 19:27
Member 38798818-Jul-09 19:27 
AnswerRe: ajax page request.forms using post method...,values inserting into db 2 times?..., Pin
Abhijit Jana8-Jul-09 19:40
professionalAbhijit Jana8-Jul-09 19:40 
GeneralRe: ajax page request.forms using post method...,values inserting into db 2 times?..., Pin
Member 38798818-Jul-09 20:17
Member 38798818-Jul-09 20:17 
GeneralRe: ajax page request.forms using post method...,values inserting into db 2 times?..., Pin
Abhijit Jana8-Jul-09 20:20
professionalAbhijit Jana8-Jul-09 20:20 
Questionlinkbutton Pin
vikas shukla8-Jul-09 19:10
vikas shukla8-Jul-09 19:10 
AnswerRe: linkbutton Pin
Abhijit Jana8-Jul-09 19:49
professionalAbhijit Jana8-Jul-09 19:49 
QuestionHow to open a word doc in firefox in a write mode using asp.net Pin
G Nathan8-Jul-09 19:10
G Nathan8-Jul-09 19:10 
AnswerRe: How to open a word doc in firefox in a write mode using asp.net Pin
PJWindsor8-Jul-09 22:39
PJWindsor8-Jul-09 22:39 
QuestionSome Basic ASP .Net Security Questions Pin
swjam8-Jul-09 18:20
swjam8-Jul-09 18:20 
QuestionCrystal Reports 2008 (12) Error when running on server Pin
Battlehammer8-Jul-09 7:32
Battlehammer8-Jul-09 7:32 
AnswerRe: Crystal Reports 2008 (12) Error when running on server Pin
Battlehammer8-Jul-09 8:06
Battlehammer8-Jul-09 8:06 
GeneralRe: Crystal Reports 2008 (12) Error when running on server Pin
Abhijit Jana8-Jul-09 8:53
professionalAbhijit Jana8-Jul-09 8:53 
GeneralRe: Crystal Reports 2008 (12) Error when running on server Pin
Battlehammer8-Jul-09 9:48
Battlehammer8-Jul-09 9:48 
QuestionASP.net Ajax Server Control Pin
PJWindsor8-Jul-09 4:04
PJWindsor8-Jul-09 4:04 
AnswerRe: ASP.net Ajax Server Control Pin
PJWindsor8-Jul-09 5:59
PJWindsor8-Jul-09 5:59 

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.