Click here to Skip to main content
15,867,568 members
Home / Discussions / Web Development
   

Web Development

 
GeneralRe: hide documents Pin
Aman Bhullar31-Dec-08 19:43
Aman Bhullar31-Dec-08 19:43 
GeneralRe: hide documents Pin
Not Active31-Dec-08 20:10
mentorNot Active31-Dec-08 20:10 
GeneralRe: hide documents Pin
Aman Bhullar31-Dec-08 20:46
Aman Bhullar31-Dec-08 20:46 
AnswerRe: hide documents Pin
Girish Nambiar1-Jan-09 22:47
Girish Nambiar1-Jan-09 22:47 
AnswerRe: hide documents Pin
SABhatti6-Jan-09 6:56
SABhatti6-Jan-09 6:56 
QuestionPopulate the dropdown list with states and cities Pin
Member 400664830-Dec-08 20:42
Member 400664830-Dec-08 20:42 
AnswerRe: Populate the dropdown list with states and cities Pin
Abhijit Jana30-Dec-08 21:09
professionalAbhijit Jana30-Dec-08 21:09 
Questiongrid.rendercontrol causes exception Pin
meg2230-Dec-08 17:50
meg2230-Dec-08 17:50 
following Exception occurs on using grid.rendercontrol(hw)

Control of type 'DataGridLinkButton' must be placed inside a form tag with runat=server.

i am working on a web application built in asp.net and vb.net framework 1.1
i need to export a grid to excel using a button click.code for button click is given below

the code snippet works fine for one web page but causes exception on the other.

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Response.Clear()
Response.ContentType = "application/vnd.ms-excel"
Response.AddHeader("content-disposition", "attachment;filename=FileName.xls")
Response.Charset = ""
Response.Cache.SetCacheability(HttpCacheability.NoCache)
Dim tw As New System.IO.StringWriter
Dim hw As New System.Web.UI.HtmlTextWriter(tw)

HtmlTextWriter(stringWrite)
Grid.RenderControl(hw)-- exception caused here
Response.Write(tw.ToString())
Response.End()
End Sub

Not able to find where is the problem....Please help
AnswerRe: grid.rendercontrol causes exception Pin
Aman Bhullar30-Dec-08 19:06
Aman Bhullar30-Dec-08 19:06 
GeneralRe: grid.rendercontrol causes exception Pin
meg2230-Dec-08 19:32
meg2230-Dec-08 19:32 
GeneralRe: grid.rendercontrol causes exception Pin
meg2230-Dec-08 21:20
meg2230-Dec-08 21:20 
GeneralRe: grid.rendercontrol causes exception Pin
Aman Bhullar31-Dec-08 6:16
Aman Bhullar31-Dec-08 6:16 
GeneralRe: grid.rendercontrol causes exception Pin
meg221-Jan-09 16:55
meg221-Jan-09 16:55 
GeneralRe: grid.rendercontrol causes exception Pin
Aman Bhullar1-Jan-09 18:24
Aman Bhullar1-Jan-09 18:24 
QuestionTool to test webpage Pin
Mekong River29-Dec-08 22:33
Mekong River29-Dec-08 22:33 
AnswerRe: Tool to test webpage Pin
Pedram Behroozi30-Dec-08 8:48
Pedram Behroozi30-Dec-08 8:48 
GeneralRe: Tool to test webpage Pin
Mekong River30-Dec-08 13:43
Mekong River30-Dec-08 13:43 
AnswerRe: Tool to test webpage Pin
Not Active30-Dec-08 16:00
mentorNot Active30-Dec-08 16:00 
AnswerRe: Tool to test webpage Pin
Rajdev Ramasamy12-Jan-09 2:32
Rajdev Ramasamy12-Jan-09 2:32 
QuestionHaving problems with unit testing a web service Pin
Rafferty Uy29-Dec-08 20:12
Rafferty Uy29-Dec-08 20:12 
AnswerRe: Having problems with unit testing a web service Pin
Abhijit Jana1-Jan-09 0:10
professionalAbhijit Jana1-Jan-09 0:10 
GeneralRe: Having problems with unit testing a web service Pin
Rafferty Uy1-Jan-09 14:40
Rafferty Uy1-Jan-09 14:40 
QuestionOpen Crystal report using Javascript. Pin
Chinzac29-Dec-08 16:21
Chinzac29-Dec-08 16:21 
QuestionCrystal Report Viewer Pin
Civic0629-Dec-08 7:40
Civic0629-Dec-08 7:40 
AnswerRe: Crystal Report Viewer Pin
Not Active29-Dec-08 11:01
mentorNot Active29-Dec-08 11:01 

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.