473,387 Members | 1,606 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Response.write()in ajax enabled wesite

366 256MB
Hello friends

i am developing ajax enabled wesite in asp.net2.0 and c#

in the webforms where ever i am using update panel of ajaxtoolkit Respose.write is not working ,on ther form where there is no update panel ,in those forms it works fine

what is solution for writing responce.write method in forms that have update panel ,any help please


Thanks
Jun 6 '07 #1
5 13343
kenobewan
4,871 Expert 4TB
Have you tried write(string) instead?
Jun 6 '07 #2
nateraaaa
663 Expert 512MB
Instead of using Response.Write on your AjaxEnabled website page have you tried updating a label with the text you wanted to show using Response.Write?
Check out the following website

http://www.asp.net/learn/videos/default.aspx?tabid=63#ajax
If Joe Stagner does not use Response.Write in any of his tutorials you may not be able to use Response.Write. I am sure that he shows an alternative to that though.

Good Luck

Nathan
Jun 6 '07 #3
nmsreddi
366 256MB
Instead of using Response.Write on your AjaxEnabled website page have you tried updating a label with the text you wanted to show using Response.Write?
Check out the following website

http://www.asp.net/learn/videos/default.aspx?tabid=63#ajax
If Joe Stagner does not use Response.Write in any of his tutorials you may not be able to use Response.Write. I am sure that he shows an alternative to that though.

Good Luck

Nathan


Thanks nathan

Your idea isgood that using label instead of response.write()

but my requirement is not just writing text on the web page

i will write some java script alert method in that response.write()

method ,that is similar to message box in windows application

is there any other alternative of giving an alert message like popup for validation purpose in asp.net

Thanks
Jun 7 '07 #4
I think it is not possible
Mar 17 '08 #5
Frinavale
9,735 Expert Mod 8TB
Thanks nathan

Your idea isgood that using label instead of response.write()

but my requirement is not just writing text on the web page

i will write some java script alert method in that response.write()

method ,that is similar to message box in windows application

is there any other alternative of giving an alert message like popup for validation purpose in asp.net

Thanks
The reason why your response.write is not working is because of the partial page update....

Only part of the page is being updated, therefore response.write is not going to work properly.

The most confusing thing for you is probably when you look at the HTML(view source) of the page after it has been re-rendered...you may see your response.write content there (your JavaScript). However, this is not actually the HTML that the browser is using. The browser's using the old HTML (that was rendered the first time) with only that one section within your UpdatePanel updated.

I would recommend rethinking your JavaScript...maybe place it in an external .js file that is always accessible to the page content.

Also, you shouldn't really be using Response.Write...it places content anywhere in the output stream (could be before the <head>...before the <body> ...anywhere in the page) and this could cause problems. Instead you should consider using the Page.ClientScript.RegisterClientScriptBlock() method to send your script to the browser.

-Frinny
Mar 17 '08 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: orion30 | last post by:
Is-it possible to write in a mother window from a child window ? Like this: Parent.document.write(............................................)
25
by: jullag | last post by:
Hi, does anyone know of any javascript method that does the same job as document.write(), but not necessarily at the end of the document? For instance, insert some text inside an element that...
4
by: Tom | last post by:
Hi, this snippet of code gives an error in Firefox but works just fine in IE. <html> <head> <script type="text/javascript"> function start(){ statusarray = new Array();...
1
by: Vaughn | last post by:
I have a listview with two columns that is supposed to show the contents of two files. I the 1st column, I just display it with listView1.Items.Add ("Test") and a While loop, but how can I tell C#...
14
by: Gidi | last post by:
Hi, For the last week, i'm looking for a way to make a TextBox always write in English (No matter what the OS default language is). i asked here few times but the answers i got didn't help me. i...
3
by: belange | last post by:
I try to create a little web application with c# and visual studio.net. With this application, a student can reserved a computer station, the day and the hour. I want to write these informations in...
5
by: Peter Aitken | last post by:
In my usercontrol I want to use response.write in code behind to write HTML to the page. However it outputs at the top of the page and I want the output at the bottom, beneath the controls. How can...
8
by: Alejandro | last post by:
Hi: I'm using pySerial to talk to a RS232 to RS485 converter. In order to control the converter, I need to control the DTR line to enable/disable de RS485 driver. In particular, I need to : ...
2
by: Nicole.Winfrey | last post by:
Hi, At the moment, I'm displaying the XML HTTP response text using javascript alert (see below). I'm trying to render XML HTTP response in a new window and the output of the window needs to be ...
2
by: Vikashag | last post by:
Hi When I am trying to write in a binary file its giving me error. Now What I have to do? and in this Base64Decode2 is converted Binary data. Its giving the errror Arguments are of the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.