473,396 Members | 2,020 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,396 software developers and data experts.

Send output to specific panel

Hello all, I'm a bit of an ASP.NET / C# noob so bear with me.

In my codebhind I have taken some data and based on that data I have
some javascript to post back to my page. The javascript is in the
string variable "BottomCode".

I need to post the contents of the BottomCode file inside a particular
Panel on my page but I'm not sure how to do it. I tried writing it to
a lable but found that #1 you cant have newlines in a label and #2 it
encapsulated my javascript code with SPAN tags.

How can I do this?

Thanks!
Chris

Oct 11 '07 #1
5 2835
Chris,

Do you mean you actually have to have the Javascript embedded in the
page (and not displayed)? If so, then why not just use Response.Write at
the point you want the script block inserted?
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"ChrisC" <iw*******@gmail.comwrote in message
news:11**********************@50g2000hsm.googlegro ups.com...
Hello all, I'm a bit of an ASP.NET / C# noob so bear with me.

In my codebhind I have taken some data and based on that data I have
some javascript to post back to my page. The javascript is in the
string variable "BottomCode".

I need to post the contents of the BottomCode file inside a particular
Panel on my page but I'm not sure how to do it. I tried writing it to
a lable but found that #1 you cant have newlines in a label and #2 it
encapsulated my javascript code with SPAN tags.

How can I do this?

Thanks!
Chris

Oct 11 '07 #2
Hi,

"ChrisC" <iw*******@gmail.comwrote in message
news:11**********************@50g2000hsm.googlegro ups.com...
Hello all, I'm a bit of an ASP.NET / C# noob so bear with me.
Then you better post in the ASPNET NG.
In my codebhind I have taken some data and based on that data I have
some javascript to post back to my page. The javascript is in the
string variable "BottomCode".
Do not understand that, how you send it to the client?
And how the client execute it?
I need to post the contents of the BottomCode file inside a particular
Panel on my page but I'm not sure how to do it. I tried writing it to
a lable but found that #1 you cant have newlines in a label and #2 it
encapsulated my javascript code with SPAN tags.
Is BottomCode a file or a variable?

If you want to dump a file you can use a Literal control and place it inside
the Panel
Oct 11 '07 #3
Why not posting this to ASP.NET Group?
"ChrisC" <iw*******@gmail.comwrote in message
news:11**********************@50g2000hsm.googlegro ups.com...
Hello all, I'm a bit of an ASP.NET / C# noob so bear with me.

In my codebhind I have taken some data and based on that data I have
some javascript to post back to my page. The javascript is in the
string variable "BottomCode".

I need to post the contents of the BottomCode file inside a particular
Panel on my page but I'm not sure how to do it. I tried writing it to
a lable but found that #1 you cant have newlines in a label and #2 it
encapsulated my javascript code with SPAN tags.

How can I do this?

Thanks!
Chris

Oct 11 '07 #4
Sorry, I should have been more clear. I used some code in my
CodeBehind file to write information to a variable named BottomCode.

What I need to send back to the page is:

<script type="text/javascript">
<!--
SET_DHTML("frame1", "frame2");

//-->
</script>

where frame1, frame 2 etc was some data I got earlier in my
CodeBehindfile. Now i have the above script code in the variable
BottomCode and I need to write it back to the browser. Forget the
part about the Panel...it doesn't have to go inside a panel or label,
I just need to figure out a way to write this back to the page before
the </BODYtag.

I tried this:
Response.Write(BottomCode);

But this writes the script at the top of the HTML above the doctype
and everything. i need it to write in the <BODY></BODYarea.

Hope I'm making sense here. This is all still a bit new to me.

-Chris

Oct 11 '07 #5
Then you need to use ScriptManager.RegisterClientScriptBlock

--
Ignacio Machin
www.laceupsolutions.com
Mobile & warehouse Solutions.

"ChrisC" <iw*******@gmail.comwrote in message
news:11**********************@57g2000hsv.googlegro ups.com...
Sorry, I should have been more clear. I used some code in my
CodeBehind file to write information to a variable named BottomCode.

What I need to send back to the page is:

<script type="text/javascript">
<!--
SET_DHTML("frame1", "frame2");

//-->
</script>

where frame1, frame 2 etc was some data I got earlier in my
CodeBehindfile. Now i have the above script code in the variable
BottomCode and I need to write it back to the browser. Forget the
part about the Panel...it doesn't have to go inside a panel or label,
I just need to figure out a way to write this back to the page before
the </BODYtag.

I tried this:
Response.Write(BottomCode);

But this writes the script at the top of the HTML above the doctype
and everything. i need it to write in the <BODY></BODYarea.

Hope I'm making sense here. This is all still a bit new to me.

-Chris

Oct 11 '07 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: CK | last post by:
Hi all, I know this question is stupid. But i need some advice for this. I am trying to develop a website, which will allow the user send to order form to the admin email. I am planning to use the...
2
by: Boba | last post by:
Hi, I'm programming a WinForm application. I would like to enter commands that will send output that will help me to locate bugs in the future. I know that there is a way to send output by...
2
by: Fatih BOY | last post by:
Hi, I want to send a report from a windows application to a web page like 'report.asp' Currently i can send it via post method with a context like local=En&Username=fatih&UserId=45&Firm=none...
17
by: MLH | last post by:
From time to time, I find myself cross checking one block of code against another. Usually older stuff in which I've made modifications that don't work. I don't remember what all the changes were...
3
by: Philip Wagenaar | last post by:
How can I get the output from a process.start. Example: Process.Start("c:\windows\system32\rp", PrintQueue & " " & filename, Username, pass, ComputerName) How do I get the output of this...
3
by: bloc | last post by:
I am programming an interactive CV using xml, xslt and java script. The page consists of a header which contains links to various 'sections' on the xml cv, a left and right menu, and a central...
17
by: rdemyan | last post by:
My app creates a building report. My users have requested that I provide functionality to e-mail these "building reports" to building managers once a month. So assuming that I have the...
6
by: druidamix | last post by:
I'm trying to make a gui for an application, but it not run. i'm trying to send the output of execlp to pipe and read from his father. but i don't obtain results. Any advince? Thank you. ...
4
by: =?Utf-8?B?R2lkaQ==?= | last post by:
Hi, I've windows form, in this form i've a panel. I want to draw lines inside the panel using the panel coordinates( meaing that the left upper corner of the panel is 0,0), how can i do it? ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.