Click here to Skip to main content
15,899,474 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: How to get Distinct values in DropDownList? Pin
chand109-Jul-07 1:05
chand109-Jul-07 1:05 
Questiondatagird to Excel sheet Pin
Archana New to Dotnet9-Jul-07 0:32
Archana New to Dotnet9-Jul-07 0:32 
AnswerRe: datagird to Excel sheet Pin
N a v a n e e t h9-Jul-07 0:55
N a v a n e e t h9-Jul-07 0:55 
GeneralRe: datagird to Excel sheet Pin
Archana New to Dotnet9-Jul-07 1:09
Archana New to Dotnet9-Jul-07 1:09 
AnswerRe: From stored procedure to bind datas to datagrid..., Pin
N a v a n e e t h9-Jul-07 0:00
N a v a n e e t h9-Jul-07 0:00 
GeneralRe: From stored procedure to bind datas to datagrid..., Pin
Member 38798819-Jul-07 0:04
Member 38798819-Jul-07 0:04 
GeneralRe: From stored procedure to bind datas to datagrid..., Pin
Archana New to Dotnet9-Jul-07 0:36
Archana New to Dotnet9-Jul-07 0:36 
GeneralSolution Pin
Archana New to Dotnet9-Jul-07 1:39
Archana New to Dotnet9-Jul-07 1:39 
the below code is super fast and got it through searching inside Code project itself

Dim ds As DataSet
ds = New DataSet()
Dim dg As New System.Web.UI.WebControls.DataGrid()
'fill datagrid
da.Fill(ds)
dg.DataSource = ds
dg.DataBind()
'datagrid formatting
dg.Font.Name = "Verdana"
dg.BorderStyle = System.Web.UI.WebControls.BorderStyle.Solid
dg.HeaderStyle.BackColor = System.Drawing.Color.Blue
dg.HeaderStyle.ForeColor = System.Drawing.Color.White
dg.HeaderStyle.HorizontalAlign = System.Web.UI.WebControls.HorizontalAlign.Center
dg.HeaderStyle.Wrap = False
dg.HeaderStyle.Font.Bold = True

'export to excel
Context.Response.Buffer = True
Context.Response.ClearContent()
Context.Response.ClearHeaders()
Context.Response.ContentType = "application/vnd.ms-excel"
EnableViewState = True
Dim tw As New System.IO.StringWriter()
Dim hw As New System.Web.UI.HtmlTextWriter(tw)
dg.RenderControl(hw)
Context.Response.Write(Now)

Context.Response.Write(tw.ToString())
Context.Response.Flush()
Context.Response.Close()
Context.Response.End()
da.Dispose()
da = Nothing
ds.Dispose()
ds = Nothing
con.Close()
con.Dispose()
con = Nothing

Questionjava script error [modified] Pin
Sonia Gupta8-Jul-07 23:08
Sonia Gupta8-Jul-07 23:08 
AnswerRe: java script error Pin
Piyush Vardhan Singh8-Jul-07 23:27
Piyush Vardhan Singh8-Jul-07 23:27 
GeneralRe: java script error Pin
Sonia Gupta8-Jul-07 23:31
Sonia Gupta8-Jul-07 23:31 
AnswerRe: java script error Pin
N a v a n e e t h8-Jul-07 23:30
N a v a n e e t h8-Jul-07 23:30 
GeneralRe: java script error Pin
Sonia Gupta8-Jul-07 23:32
Sonia Gupta8-Jul-07 23:32 
AnswerRe: java script error Pin
jai 1238-Jul-07 23:31
jai 1238-Jul-07 23:31 
AnswerRe: java script error Pin
Imran Khan Pathan8-Jul-07 23:53
Imran Khan Pathan8-Jul-07 23:53 
GeneralRe: java script error Pin
Sonia Gupta8-Jul-07 23:56
Sonia Gupta8-Jul-07 23:56 
GeneralRe: java script error Pin
Imran Khan Pathan8-Jul-07 23:59
Imran Khan Pathan8-Jul-07 23:59 
GeneralRe: java script error Pin
Sonia Gupta9-Jul-07 0:02
Sonia Gupta9-Jul-07 0:02 
GeneralRe: java script error Pin
N a v a n e e t h9-Jul-07 0:06
N a v a n e e t h9-Jul-07 0:06 
GeneralRe: java script error Pin
Sonia Gupta9-Jul-07 0:09
Sonia Gupta9-Jul-07 0:09 
GeneralRe: java script error Pin
Imran Khan Pathan9-Jul-07 0:09
Imran Khan Pathan9-Jul-07 0:09 
GeneralRe: java script error Pin
Sonia Gupta9-Jul-07 0:11
Sonia Gupta9-Jul-07 0:11 
GeneralRe: java script error Pin
N a v a n e e t h9-Jul-07 0:12
N a v a n e e t h9-Jul-07 0:12 
GeneralRe: java script error Pin
Sonia Gupta9-Jul-07 0:31
Sonia Gupta9-Jul-07 0:31 
GeneralRe: java script error Pin
Piyush Vardhan Singh9-Jul-07 0:48
Piyush Vardhan Singh9-Jul-07 0:48 

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.