actually i m having a table name emp with colums id,name,salary,address
i want to write a code in asp.net for insertion of record in the table such that i m having a class in my sol explorer in that i declare a method with parameter(table name,name valuecollection) and the insert query code
from the default page i have to write a code such that i will pass these two parameter to the method and insert query in the method should be so much strong that automatically i fires command on the backend and record are inserted,,,,,,
from my default page i will take 4 textboxes for the values to be inserted and these values are bind to the namevalue collection as keyvalue and key will be the column name of the table,,,,then this name valuecollection is passed to the method in the class
along with table name as another parameter,,,,,,
ToughMan
Participant
1490 Points
635 Posts
Re: method in C# for encryption and decryption of password
Nov 24, 2012 10:47 AM|LINK
No UI codes at all!!!!!!!!!!!!!!!!!!!!
UI codes just depend on what ur UI looks like!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
mishra.bhupe...
Participant
1594 Points
376 Posts
Re: method in C# for encryption and decryption of password
Nov 24, 2012 10:48 AM|LINK
You can use SQLHelper class.
All such methods are inbuilt on that class.
ToughMan
Participant
1490 Points
635 Posts
Re: method in C# for encryption and decryption of password
Nov 24, 2012 10:49 AM|LINK
Use ur brain first to ask question or offer ur codes, we cannot help to work for u!!!!!!!!!!!!!!!!!!!!!!!!
I cannot understand what you want!!!!!!!!!!!!!
So next time plzzzzzzzzzzzzzzzzzzzzzzz elebrate ur question clearlyyyyyyyyyyyyyyyyyyyyyy
aqueelahmad
0 Points
9 Posts
Re: method in C# for encryption and decryption of password
Nov 24, 2012 02:38 PM|LINK
actually i m having a table name emp with colums id,name,salary,address
i want to write a code in asp.net for insertion of record in the table such that i m having a class in my sol explorer in that i declare a method with parameter(table name,name valuecollection) and the insert query code
from the default page i have to write a code such that i will pass these two parameter to the method and insert query in the method should be so much strong that automatically i fires command on the backend and record are inserted,,,,,,
from my default page i will take 4 textboxes for the values to be inserted and these values are bind to the namevalue collection as keyvalue and key will be the column name of the table,,,,then this name valuecollection is passed to the method in the class along with table name as another parameter,,,,,,
i hope u have understood my prblem
aqueelahmad
0 Points
9 Posts
Re: method in C# for encryption and decryption of password
Nov 24, 2012 05:45 PM|LINK
i have asked my question in a very simple english language i hope Mr Tough Man dont understand simple english also......
Decker Dong ...
All-Star
118619 Points
18779 Posts
Re: method in C# for encryption and decryption of password
Nov 25, 2012 12:53 AM|LINK
Hello,
@ToughMan:I would be first very glad that you can join our group to discuss the problem, it would be nicer if you can be kind to reply to others.
@aqueelahmad:
Where are the four textboxes?Are they in a data presentation control such as GridView……?How will you pass their values?
aqueelahmad
0 Points
9 Posts
Re: method in C# for encryption and decryption of password
Nov 25, 2012 05:55 AM|LINK
yes off course........ directly from the presentation layer
Decker Dong ...
All-Star
118619 Points
18779 Posts
Re: method in C# for encryption and decryption of password
Nov 25, 2012 06:24 AM|LINK
Hi,
Sorry again but you don't offer us your table's diagram as well as other information,please apply this sample code according to your own situation:
private static Type ReadOrderData(string connectionString) { string queryString = "Insert into xxx value(@p1,@p2,……,@pn)"; using (SqlConnection connection = new SqlConnection( connectionString)) { SqlCommand command = new SqlCommand( queryString, connection); connection.Open(); command.ExecuteNonQuery(); return sometypeInstance; } }thaicarrot
Contributor
5126 Points
1462 Posts
Re: method in C# for encryption and decryption of password
Nov 25, 2012 08:41 AM|LINK
Have you solved? this is too simple.
Weera
aqueelahmad
0 Points
9 Posts
Re: method in C# for encryption and decryption of password
Nov 25, 2012 11:36 AM|LINK
Id
Name
Salary
address
Contact no