CodeVerge.Net Beta
Login Idy
Register Password
  Forgot?
Explore    Item Entry    Members   
NEWSGROUP
.NET
Algorithms-Data Structures
Asp.Net
C Plus Plus
CSharp
Database
HTML
Javascript
Linq
Other
Regular Expressions
VB.Net
XML





Zone: > NEWSGROUP > Asp.Net Forum > visual_studio.visual_web_developer_2008_express Tags:
Item Type: NewsGroup Date Entered: 11/19/2007 12:35:24 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 2 Views: 5 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
3 Items, 1 Pages 1 |< << Go >> >|
ldechent
Asp.Net User
Writing text to a page that is generated in the code behind (C#)11/19/2007 12:35:24 PM

0/0

I've had success filling text into labels, but I would like to also write some text that isn't placed into a label.  Can this be done?  I found system.console.Write, and I tried the following:

float T001 = 0;

System.Console.Write("Value T001 = ");

System.Console.WriteLine(T001);

 

The above  didn't generate any errors, but it didn't send text to the page either.  Did I miss something? Am I headed in the wrong direction?

P.S. - I found another example on the internet without the word System, so I tried taking it off -- again, no errors, but it didn't print the text (will keep trying... : - )

 Thank you,

 -Larry


Start with something simple that works.
Mikesdotnetting
Asp.Net User
Re: Writing text to a page that is generated in the code behind (C#)11/19/2007 12:48:51 PM

0/0

Console.Write is for console or commandline applications. 

If you don't want text to be written to a label, use the Literal Control instead.  It renders what you write to it....  well, literally. You would use it in the same way as a label: Literal1.Text = "Value T001 = " + T001;

Or, you could use Response.Write(), although your wouldn't use that in a proper web application.

 


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
bhupender
Asp.Net User
Re: Writing text to a page that is generated in the code behind (C#)11/19/2007 12:50:47 PM

0/0

 use  Response.Write("hi"); in code behind file

for this perpose

console class is used to write console based aplication or command prompt  

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



Search This Site:


Meet Our Sponsors:



Other Resources:

possible bug: generated code are emitted in the aspx form by the ... ... in between script tags of an aspx form and not in the code behind. ... Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits ...
HTML Screen Scraping in C# In other words we don't see the HTML behind the pages. ... lblWebpage.Text = objUTF8.GetString(reqHTML); Explanation of the Code Snippet in C#: ...
Writing Code Generators with the Code Document Object Model - Part 1 ... keep in mind that CodeObjects can be generated as different ... ( The CodeDOM is language neutral.) Go to page: 1 2 Next. Solutions. Whitepapers and eBooks ...
CodeProject: Writing An Extensible COM Application. Free source code ... This is the wizard-generated implementation of IEffect's GetName() method. ... Introduction to COM Part II - Behind the Scenes of a COM Server ...
How to get text of a website at the command line - ASP.NET 2.0 Code Example Simple use of code behind. How to write to an XML file. How to create simple functions in C# ... the full code so you have to add it to the generated files ...
CodeProject: Building a Better Wait Page. Free source code and ... The wait page doesn't need any code-behind code because it is simply a display page that uses ... to it but may contain usage terms in the article text or ...
InformIT: Microsoft.NET Web Forms > Code-Behind Programming Figure 7 DLL generated from a page that uses code-behind. ... Code embedded in ASPX files has to be written in one of three languages: C#, ...
Writing Custom Code in SQL Server Reporting Services - Bryant Likes's Blog On that page under embedded code you will see the following statement. ... i have a need to generated a report which produces pics and associated values in ...
CodeGuru: Meditating Upon the ASP.NET Code-Behind Model ... dynamically generated class that represents the .aspx resource in execution. ... The key point about the code-behind model is that you can bind a class to a page ...
InformIT: Introduction to Office Solutions Using Visual Studio Tools ... This enables you to write code like this in the Startup method of a ... the code behind class, there is also a generated method called InternalStartup. ...
Dynamically Executing Code in .Net - Page 2 - Programmer's Heaven Take a look at Figure 2, which shows both the generated C# code and the output. ... has a private implementation of a Response object that is used to write output ...


 
All Times Are GMT