I intend to check the user's work ID based on the user's input in the text box, and I intend to redirect the user to the edit page as soon as the existing username is entered. For the time being, I have this code. I was attempting to cache the entire table column and then refer to it in the text box, but I'm getting the following errors. I'm not sure what I'm missing here.
Errors
error CS1513: } expected
error CS1519: Invalid token 'return' in class, struct, or interface member declaration
error CS1022: Type or namespace definition, or end-of-file expected
My code is:
protected void Work_ID_TextChanged(object sender, EventArgs e)
{
var query = from myRow in myDataTable.AsEnumerable()
where r.Field<string>("WorkO_ID")==Work_ID.Text
select new
{
Work_ID = myRow.Field<string>("Work_ID"),
};
foreach (var row in query)
{
System.Diagnostics.Process.Start(new ProcessStartInfo
{
FileName = "edit",
UseShellExecute = true
});
}
}
It should not be indented beneath anything; it should be able to stand on its own.