Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is there an equivalent to TEXT/ENDTEXT in C#?
Message
 
To
24/10/2004 13:13:25
Mike Sue-Ping
Cambridge, Ontario, Canada
General information
Forum:
Visual FoxPro
Category:
Visual FoxPro and .NET
Miscellaneous
Thread ID:
00954090
Message ID:
00954139
Views:
25
>Title says it all.
>
>Right now I find myself using the StreamWriter.WriteLine() which is a pain when I'm trying to create some HTML.


If you're just trying to write out text without merging in C# use syntax liks this:
SqlString = 
@"select * from someFile
   where Id = 'SomeOtherString'
   order by id
";
This works fine for everything except embedded quotes which must be escaped. You can also use string.Format() with this by embedding {0} {1} etc. and then using parameters which provides pseudo TextMerge behavior that is fairly effective.

If you really need to textmerge there are some ways that you can do this, but they are all a lot of work. If you do serious templating you can use the ASP.NET engine to do this and this is really powerful.

http://www.west-wind.com/presentations/aspnetruntime/aspnetruntime.asp

If you just need to dynamically execute script you can also do this:

http://www.west-wind.com/presentations/DynamicCode/DynamicCode.htm

This may seem like a lot of work and it is, but these tools also give you a lot more functionalty than what you have available in VFP in terms of fine tuning how tis code runs. For example, the dynamic code execution allows you to launch code from different mahcines and code.


REgards,

+++ Rick ---
+++ Rick ---

West Wind Technologies
Maui, Hawaii

west-wind.com/
West Wind Message Board
Rick's Web Log
Markdown Monster
---
Making waves on the Web

Where do you want to surf today?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform