Hi Stephen,
I just want web form with 2 fields in separate textboxes (not greeds or
listbox).
User send data to table which latter I use from my VFP desktop app. That is
all.
Q. in PS are of importance, also. In fact I should be happy to see
finished, working form,
but any help is wellcome.
Thanks, gojko
At 19:46 07.12.2006, you wrote:
>Gojko Bozic <> wrote:
> > Hi,
> >
> > Need some simple but complete example of Webform with free VFP table
> > behind.
> >
> > 1. I am using VWD 2005 Express Edit.
> > 2. Connect string is defined in the web.config 3. On the form there
> > are 2 ( or more, but > 1 !) fields 4. There is a submit/add button on
> > the form 5. The user just sends ( name, e_mail - ofcourse ...) data
> > back to table 6. Fields on the form are cleared and wait for new data
> > 7. Code in C# should be in separate file
> >
> > (Yes, I have many texts about ADO.NET and VFP but I can't just do
> > such a form quickly and in the most simpliest way at this moment).
>
>Are you looking for how to communicate between ASP.Net and VFP?
>
>In the Click make a reference to a dataLoad function.
>private void MyButton_Click(object sender, System.EventArgs e)
> {
>int KeyID = 101 // Get your key loaded how ever you need it
> dataLoad(KeyID); // You pass the key of data row
>you wanted here.
> }
>
>
>public void dataLoad(int iKey)
> {
> string strConnection = "Provider=vfpoledb.1;Data
>Source=C:\MyDataDirectory\;Collating Sequence=general;"
> // Stuff your going after
> string strSQL = "SELECT MyFields from Mytale where
>ID = " +Convert.ToString(iKey);
> SqlConnection objConnection = new
>SqlConnection(strConnection);
> SqlCommand objCommand = new SqlCommand(strSQL,
>objConnection);
>
> objConnection.Open();
> // I am taking the data and filling a listbox from
>my source but you
> // could put it in a table or in a dataset and then
>in a table.
> MyDropDownList1.DataSource =
>objCommand.ExecuteReader();
> MyDropDownList1.DataTextField = "ma_applpg";
>//What I will display
> MyDropDownList1.DataValueField = "ma_ID";
>//What is it's KEY
> MyDropDownList1.DataBind();
> objConnection.Close();
> objConnection.Dispose();
> }
>
>
>Stephen Russell
>DBA / .Net Developer
>
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
** All postings, unless explicitly stated otherwise, are the opinions of the
author, and do not constitute legal or medical advice. This statement is added
to the messages for those lawyers who are too stupid to see the obvious.