CodeVerge.Net Beta


   Explore    Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums

ASP.NET Web Hosting – 3 Months Free!



Zone: > NEWSGROUP > Asp.Net Forum > visual_studio.visual_web_developer_2005_express Tags:
Item Type: NewsGroup Date Entered: 10/1/2007 8:30:54 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 4 Views: 24 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
5 Items, 1 Pages 1 |< << Go >> >|
EDANGALLACA
Asp.Net User
Hi there i got a question10/1/2007 8:30:54 PM

0/0

 First of all excuse 4 my english im learnig

 Iam leraning with microsoft web developer, before that i was learning with visual studio 2003 , but since i try web developer it likes me more than asp.net, so iam migrating my old web pages(reports of sqlserver) to web developer, the issue is that in web developer when i export to excel the datagrids it gives me an error "Control 'ctl00_ContentPlaceHolder1_DataGrid2'  of type 'GridView' must be placed inside a form tag with runat=server.", the code i use is this;

Private Sub Exporta_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Exporta.Click

' Damos la salida como attachment con el nombre de Testeo.xls.

Response.AddHeader("content-disposition", "attachment; filename=reporte_reetriqueteo.xls")

' Especificamos el tipo de salida.

Response.ContentType = "application/vnd.ms-excel"

' Asociamos la salida con la codificaci?n UTF7 (para poder visualizar los acentos correctamente)

Response.ContentEncoding = System.Text.Encoding.UTF7

Response.Charset = ""

Me.EnableViewState = False

Dim tw As New System.IO.StringWriter

Dim hw As New System.Web.UI.HtmlTextWriter(tw)

DataGrid2.RenderControl(hw) ' g es el DATAGRID----HERE MARKS THE ERROR

'Escribimos el HTML en el Explorador

Response.Write(tw.ToString())

' Terminamos el Response.

Response.End()

End Sub

 

is the same code i use in asp.net and it works, so, what could be the solution? iam make a lot of research and i didnt find anyting useful, so if anyone of you have some answer or opinion i would apreciate it,anticipated tanks.

Mikesdotnetting
Asp.Net User
Re: Hi there i got a question10/1/2007 9:09:25 PM

0/0

You need to add

Public Overloads Overrides Sub VerifyRenderingInServerForm(ByVal control As Control)
    Return
End Sub

to your code to prevent this error. 


Regards Mike

8 out of 10 questions have already been asked. Their answers can be found using Google. Go on, try it.

If you prefer code samples or tutorials in another language, translate it for free at www.codechanger.com
EDANGALLACA
Asp.Net User
Re: Hi there i got a question10/1/2007 9:56:36 PM

0/0

THANKS IT WORKS !!!! YOURE A LIFE SAVER MAN !! I OWE YOU A BEER !!!

 but now i got another problem, when i put this web site in our server(intranet) in iss it gives me an error in the config file when i try to browse it, line 12,

<configuration>

<appSettings/>

<connectionStrings/>'-----HERE IS THE ERROR SAYS THAT THIS COMMAND IS NOT RECOGNIZED

<system.web>

<!--

ADVANCED THANKS

Mikesdotnetting
Asp.Net User
Re: Hi there i got a question10/2/2007 4:22:20 PM

0/0

Do you have version 2.0 of the framework installed on the server, and is the site set up to run under this version on the IIS configuration tab?

Regards Mike

8 out of 10 questions have already been asked. Their answers can be found using Google. Go on, try it.

If you prefer code samples or tutorials in another language, translate it for free at www.codechanger.com
EDANGALLACA
Asp.Net User
Re: Hi there i got a question10/2/2007 7:34:43 PM

0/0

You hit it again, i was looking on te server and it seems that is only framework 1.1 installed , but the server must e runnin all day n night so i must install the framework 2 in the wekend and some other stuff, iam entering in this new departament and there are too may things to do, you know is hard when you get others programs

5 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Cowgirls: Women of the American West Authors: Teresa Jordan, Pages: 309, Published: 1992
Consequences Authors: Penelope Lively, Pages: 258, Published: 2007
A Trading Desk's View of Market Quality Authors: Robert Alan Schwartz, John Aidan Byrne, Antoinette Colaninno, Pages: 199, Published: 2004

Web:
Hi there, I've got a confusing question about Apple TV,,, - ehMac.ca I just bought an Apple TV and I'm a bit confused,,,,my main function for the Apple TV was to rip all of my 4 year old's DVD's since I don't want him.
HI THERE, I GOT A SONY STR-DE 875 AMPLIFIER.IT MAKES A CLICKING... HI THERE, I GOT A SONY STR-DE 875 AMPLIFIER. ... Sign up now to ask a question or help someone else by giving an answer! ...
FAQ - Got a question? Ask it here! - MediaBlvd Forums Hi there...I've got a question! I can't find anywhere the MAD PROFESSOR " beatrocker" song, played in S05E03, when the ladies are working out at the gym. ...
help - i got robbed - question about audi a4 front turn signal ... hi there - ive got a 1997 audi a4 that had the turn signal housing on it stolen on it. the entire housing, the lens, the bulb, ...
Hi there i got a slow cooker what good easy recipes r there 2 cook ... "Hi there i got a slow cooker what good easy recipes r there 2 cook in it pls , i am in the uk ty ?" - Find the answer to this question and ...
Got a question about Islam? - InterfaithForums Hi there everyone, Salaam [Peace] Thank you all for a warm wellcome. I'm sorry to have been away for sometime; got caught up in the hectic ...
The Gunfighter Zone Forums : View topic - Hi there, I'm new, and ... Nov 12, 2008 ... Posted: Tue Nov 11, 2008 1:27 pm Post subject: Hi there, I'm new, and got a question already, Reply with quote ...
Car Repair > Hi there, I got an Interview question today ... Hi there, I got an Interview question today concerning Hummer. The question is: How many RED HUMMER is there in Miami. Anyone got a clue as how can I find ...
I've got a question.: msg#00028 education.english.belajar-english Hi there,. I've got a question about the usage of expressions containing the word "deal" , actually in some conditions and sentences this word doesn't ...
Adding static routes in solaris - ITtoolbox Groups Hi there, I've got a pretty simple question. I do most of my administration on Dec Unix boxes. To create a static route I simply edit the /etc/routes file. ...

Videos:
AMV - Essence [Bleach] Hi there! [Placed 1st in killerLITUHANIA's amv contest.] [Placed 2nd in shadox9x's amv contest] Fist of all I uploaded it in poor ...
A Day with the Jonas Brothers My day of trying to meet the Jonas Brothers. It was in San Diego, CA on November 8, 2007. I started my day by going to a radio station at 6am ...
HAZEL MCCALLION "OUR FUTURE MISSISSAUGA" complete speech MISSISSAUGA WATCH Blog: http://www.mississaugablogs.com/Mississauga_Musings/ Our Future Mississauga and the much-celebrated "Community ...
My Little Hoomii Course: Preview !CANCELLED! Just to be clear, there's another video called Abort. So no more comments about how great it would be to have this course, please ...
let it rain hi there tubees, here's a tune about rain, i wanted it to be about snow but couldn't fit it into the lyrics ...
I am giving away a PS3 NOTE: THE PRIZE YOU PICK ON THE SITE ISNT MY PS3 just to let you know. my ps3 is the prize you will get for folllowing the instructions ...
Love Or Honor? 3x29 I Wanna Be. Hi Peeps :p Just so you know "Peeps" Is my new word so I can say it as much as I want to xD Anyways, I like tried to upload this yesterday ...
Awesome answer, by Dr. Zakir Naik, to a very harsh question! (Q). Dr. Sahab, Namaste... As Salaam Walaikum. (Q) My question is this - I went to see a picture 'Khane Khuda' - There were session of three ...
Randy Pausch - Really Achieving Your Childhood Dreams Randy Pausch's Last Lecture with English and German subtitles by Friederike Sophie Brand, Spanish subtitles by Carlos Velásquez and Ezequiel ...
Uke got mail ep8: Sunday Morning, Fedoras, and cheeseburgers Nick from Cali asks "how do you play Sunday morning like on your YT vid?" Andrew Masangkay asks "What kind of hat did you wear on UGM ep5? and ...




Search This Site:










how to do a pop up ?

multiple controls & autopostback

some basic user control questions

unable to read data from the transport connection: an existing connection was forcibly closed by the remote host.

page directive

create an email attachment without creating the file (from memory)

if your learning asp.net what else would you need to no to get a job in that field????

javascript menus

listing contents of a directory

i wanna know who's online

asp components work on asp.net?

problem with user control

cssclass of image not showing border

array question

webhost doesn't support code-behind

pop up box

session

how can we use microsoft word for printing in asp.net

enterprise library daab useage - disposal???

javascript for client validation

just can't get it working

please help with session problem!?

sub vs function

shopping basket at top of page?

defining relationships b/w datatables objects

call a java in vb.net

response.redirect exception kills transaction?

open outlook new message

run exe file

installing .net on iis 5.0 (2000 server )

  Privacy | Contact Us
All Times Are GMT