473,387 Members | 1,766 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.

asp.old inline html in functions

Hi,

I have been only working in asp.old.
Upon reading and specs, i learned that asp.net does not support just
HTML rendering subs. like:

sub showHeader()
%><table>
<tr><td>Title on <%=now()%></td></tr>
<%
end sub

I read about response.writefile but that would only output raw text and
not execute any code. I searched for any tips but failed to find.
I cannot use response.write's for everything.

Please help,

Regards,
Vikas
Nov 19 '05 #1
2 1077
Seems to me you need to look into using User Controls:
http://www.dotnetjunkies.com/quickst...bpagelets.aspx

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
"Vikas Yadav" <vi*********@ctwoodapple.com> wrote in message
news:eb*************@TK2MSFTNGP15.phx.gbl...
Hi,

I have been only working in asp.old.
Upon reading and specs, i learned that asp.net does not support just
HTML rendering subs. like:

sub showHeader()
%><table>
<tr><td>Title on <%=now()%></td></tr>
<%
end sub

I read about response.writefile but that would only output raw text and
not execute any code. I searched for any tips but failed to find.
I cannot use response.write's for everything.

Please help,

Regards,
Vikas

Nov 19 '05 #2
subs and function must be defined in server blocks so you need to rewrite
as:

<script runat=server>
sub showHeader()
Response.Write("<table>");
Response.Write(String.Format("<tr><td>Title on {0}</td></tr>",now());
end sub
</script>
-- bruce (sqlwork.com)
"Vikas Yadav" <vi*********@ctwoodapple.com> wrote in message
news:eb*************@TK2MSFTNGP15.phx.gbl...
| Hi,
|
| I have been only working in asp.old.
| Upon reading and specs, i learned that asp.net does not support just
| HTML rendering subs. like:
|
| sub showHeader()
| %><table>
| <tr><td>Title on <%=now()%></td></tr>
| <%
| end sub
|
| I read about response.writefile but that would only output raw text and
| not execute any code. I searched for any tips but failed to find.
| I cannot use response.write's for everything.
|
| Please help,
|
| Regards,
| Vikas
Nov 19 '05 #3

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

Similar topics

7
by: Senthilraja | last post by:
I have the following program using templates. Someone please let me know the syntax to be used for defining the member functions push, pop etc. as non-inline functions. #include <iostream>...
4
by: Tony Johansson | last post by:
Hello experts! I'm reading a book about C++ and there is something about inline that the book says that is unclear for me. The book says the following "Because inline functions are expanded at...
1
by: kelvSYC | last post by:
I'm not sure if it violates standards or if it's just one of gcc's quirks, but on gcc with Mac OS X (at least with my installation), for some reason inline member functions that are not part of the...
6
by: John Ratliff | last post by:
I was reading the C++ FAQ Lite about inline functions, and it says the following (http://www.parashift.com/c++-faq-lite/inline-functions.html#faq-9.7) " It's usually imperative that the...
4
by: Nish | last post by:
Hi, I have a question regarding inline functions in C. If I declare a function as inline in the header file but do not define it there. Then I define that function in .c file, however neither...
3
by: Ian | last post by:
Peace, language lawyers! I'm developing a (static) library for a "memory-challenged" platform (ie, mobile). I want to (force the compiler to) inline some functions -- that are not meant to be...
30
by: Will Pittenger | last post by:
Does C# inline functions? I do not see a inline keyword. Is there an implicit inline? Can the compiler select functions for auto-inlining? I am more used to C++ where all these things are...
4
by: John Goche | last post by:
Hello, I have been going through several header source files which define classes with inline functions. In the case where the inline functions are not defined in place, the inline functions...
2
by: aaragon | last post by:
Hi everyone, I would like to create a very simple function: // header file inline void point_map() { PointMap pointMap = get(vertex_point_t(), g); } // main.cpp
6
by: Laurent Deniau | last post by:
When I compile the code below with gcc -std=c99 -W -Wall -pedantic -O3 -Winline, it reports the following: variadic.c: In function ‘fv’: variadic.c:12: warning: function ‘fv’ can never be...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: 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...
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
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...

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.