473,396 Members | 1,671 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.

Form field place holders in strings

If I have the following text in a dataset table column: "This agreement
establishes that {BandName} will play on {EventDate} between {StartTime} and
{EndTime}..." How would I then take the field names {BandName}, {StartTime},
{EndTime} and {EventDate}, match them up with actual dataset table column
names, and show the actual values instead of the placeholders on the final
page output? I know this would probably require some string parsing and
stuff, but I need some good direction here. The other thing is that this
whole thing is totally dynamic. I wont know any of the text or placeholder
names (or table column names) in advance. These forms are being creating
from a wizard control (including what form fields are used). Any ideas on
where to get started?
Jun 27 '08 #1
1 1160
"Andy B" <a_*****@sbcglobal.netwrote in message
news:eB****************@TK2MSFTNGP06.phx.gbl...
Any ideas on where to get started?
Regular Expressions. RegEx was made for requirements just like this. E.g. a
while a go I needed to scrape the contents of an HTML page and retrieve the
various <option /elements from with a <select /element. This is how I
did it:

objRegEx = new Regex("<option value((.|\n)*?)</option>",
RegexOptions.IgnoreCase);
foreach (Match objMatch in objRegEx.Matches(strHTML))
{
if (objMatch.ToString().IndexOf("%]") 0)
{
strOutput +=
objMatch.ToString().Substring(objMatch.ToString(). IndexOf(">") + 1);
strOutput = strOutput.Substring(0, strOutput.IndexOf("[")) + "\n";
}
}

You could certainly use something similar for your own requirements.
http://www.google.co.uk/search?sourc...expressions%22
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Jun 27 '08 #2

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

Similar topics

1
by: Michael Brennan-White | last post by:
If I submit my for using a get action the resulting page loads . If I use a post action I get an error page saying "The page cannot be found". I am calling the originating page!!! This happens...
25
by: Lyn | last post by:
Hi, I am working on a genealogy form. The only table (so far) lists everybody in the family, one record per person. Each record has an autonum ID. The parent form (frmMainForm) displays the...
5
by: tdmailbox | last post by:
I have a form with a child form. In the child form there is a list of names that can grow quite large. On the parent form I want to display the first name from the child form. I set up a test...
15
by: simonmarkjones | last post by:
I want to validate my form using a BeforeUpdate event. However now that i call my code with a beforeupdate it wont let me go to next or previous records. What code should i put in o allow me...
0
by: Mark Rae | last post by:
Hi, I mainly use PayPal for eCommerce, but one of the features which I don't like is the fact that you pass shopping cart data to their payment gateway by means of hidden form variables, e.g. ...
17
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - How do I get the value of a form control? -----------------------------------------------------------------------...
3
by: Rowan | last post by:
I'm trying to enter data from an array ( eg entry1=(x=>y,a=b), entry2=(x=>y,a=>c)) I'm trying to use place holders to dump the data. It maybe late but I can't get this to work. below is the actual...
2
by: Bob | last post by:
I am trying to obtain values of a submitted form when the form is inside a content placeholder via a master page. For example: <asp:content contentplaceholderid="contentMain" runat="server">...
10
by: Andy B | last post by:
If I have the following text in a dataset table column: "This agreement establishes that {BandName} will play on {EventDate} between {StartTime} and {EndTime}..." How would I then take the field...
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
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
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
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,...

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.