Question : ASP.NET LinQ Look up

Hello Everyone,

Is there a way that I can have an ASP.NET page execute a LINQ query when a user presses a button?  I have a web form with a textbox.  I have to make sure that the user entered the value correctly so I need to validate against an XML file on the server.  I cannot display the values in a dropdown because there are too many to display.

Thanks everyone.

Answer : ASP.NET LinQ Look up

Presuming there are no commas in the various fields i.e. description, etc. do not include commas.

A simpler method might be to use mysql and load the first file and then issue updates with data from the second file.

You can store the output in a file and load it.
In this case make sure to add #!/usr/local/bin/perl at the top of the file and 1; at the end of the output file so you do not get errors when you require the file where the hash is stored..
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
#!/usr/local/bin/perl
$file1="path to filename1";
my $hash={};
open (File1, "<${file1}") || die "Unable to open ${file1} for reading $! \n";
while (<File1>){
chomp();
@array=split(/,/,$_);
#The below builds a referenced hash of hashes
$hash->{$array[0]}{'exists'}=1;
$hash->{$array[0]}{'description 1 test'}=$array[1];
$hash->{$array[0]}{'field 1 test'}=$array[2];
$hash->{$array[0]}{'field 2 test'}=$array[3];
.
.
.
}
#done with processing file1.
close(File1);
open (File2,"<$file2") || die "Unable to open $file2 for reading: $!\n:"
while (<File2>){
chomp();
@array=split (/,/,$_);
if (exists $hash->{$array[0]}{'exists'} and $hash->{$array[0]}{'exists'}==1){
$hash->{$array[0]}{'first field from second file'}=$array[1];
$hash->{$array[0]}{'second field'}=$array[2];
$hash->{$array[0]}{'third field'}=$array[3];
.
.
.
.
}

}
#done with processing files when there are matching keys.
close(File2);

#you now have a $hash that is a reference to hashes.
foreach $key (keys %{$hash}){
#    print "$key :$hash->{$key}\n";
        foreach $index (keys %{$hash->{$key}}) {
           print "\$hash->{'$key'}{'$index'}=$hash->{$key}{$index}\n";
        }
}
Random Solutions  
 
programming4us programming4us