Multiple Data Entry
-
Yes .. Apurva.. i mean the same as u wrote.. Do you have any solution.. can u share me.. my mail id : samjoseph_p@hotmail.com cheers..
-
Look man if you are expecting anyone here to write the complete code for you then it will never be the case. What you can do is to start doing the same by yourself and the ask specific questions where you are stuck.
Apurva Kaushal
-
i know that. but i tried a method , which will add the controls at runtime. but the problem is , the values in it is not getting in code behind , so tat i can save to database.. i used javascript to add the html controls....
I can't say now what exactly would be the problem in this case unless I see the code. But suppose if you want to keep multiple records of the same type then what you can do is to create a datatable and insert the data dynamically to that datatable. You can store that datatable temporarily some where and at the final save take the data from the datatable and then put it in the database.
Apurva Kaushal
-
I can't say now what exactly would be the problem in this case unless I see the code. But suppose if you want to keep multiple records of the same type then what you can do is to create a datatable and insert the data dynamically to that datatable. You can store that datatable temporarily some where and at the final save take the data from the datatable and then put it in the database.
Apurva Kaushal
S i know that method.. but y m trying is , v want to avoid the postback.. let me explain the thing.. i have a page for enter product code and Quantity, so 2 txtboxes. txtpcode1, txtqty1 the txtboxes increases when the user press add more and the name of txtboxes will b like txtpcode2 , txtqty2....... up to this wrking fine. but i hve to get the values from tat txtboxes in codebehind, so tat v can save it. hope now u got me..
-
S i know that method.. but y m trying is , v want to avoid the postback.. let me explain the thing.. i have a page for enter product code and Quantity, so 2 txtboxes. txtpcode1, txtqty1 the txtboxes increases when the user press add more and the name of txtboxes will b like txtpcode2 , txtqty2....... up to this wrking fine. but i hve to get the values from tat txtboxes in codebehind, so tat v can save it. hope now u got me..
SamRST wrote:
the txtboxes increases when the user press add more
SamRST wrote:
v want to avoid the postback.
That means you are using javascript to add the element in the web page. Am I right here? If so then you have to store the values of the textbox in some hidden field otherwise you will not be in a position to access the same on the server.
Apurva Kaushal
-
SamRST wrote:
the txtboxes increases when the user press add more
SamRST wrote:
v want to avoid the postback.
That means you are using javascript to add the element in the web page. Am I right here? If so then you have to store the values of the textbox in some hidden field otherwise you will not be in a position to access the same on the server.
Apurva Kaushal
-
S m using javascript to add elements. but how can v store the values in hidden field, if d textbox increases to 20 or 30. And also , each row tere will b 2 txtboxes for pcode and qty.
-
You can store the values in hidden field by delimiting it with a semi colon or some thing else. What you need to do is to keep appending the values in hidden field when you are adding the controls.
Apurva Kaushal
-
i got ur idea. but the thing is how v vl seperate each row for eg. pcodtxt qtytxt a102 10 B1025 20 c1000 12 35622 5 3698 25 As per ur suggestion: a102;10;B1025;20;c1000;12;35622;5;3698;25; here wich is pcode , which z qty. ???????
SamRST wrote:
As per ur suggestion: a102;10;B1025;20;c1000;12;35622;5;3698;25; here wich is pcode , which z qty. ???????
Here you are separating the records with a semi colon similarly you can separate the fields with a comma. Then you can get the data like this: a,123;b,2345;c,2222; Hope this will be clarifying the issue.
Apurva Kaushal
-
SamRST wrote:
As per ur suggestion: a102;10;B1025;20;c1000;12;35622;5;3698;25; here wich is pcode , which z qty. ???????
Here you are separating the records with a semi colon similarly you can separate the fields with a comma. Then you can get the data like this: a,123;b,2345;c,2222; Hope this will be clarifying the issue.
Apurva Kaushal
-
ok, its good. but i hve 1 more pblm.. dont hit me .. Okay... now times v added the rows.. vat will happen if v delete a row. mm m m m ......
-
ok, its good. but i hve 1 more pblm.. dont hit me .. Okay... now times v added the rows.. vat will happen if v delete a row. mm m m m ......
What you need to do in that case is every time you are adding the control refresh the complete hidden field this you have to do in case of deletion also. What I mean to say here is when you are adding a new one then clear the hidden field and then add the complete set again by looping through. And this has to be repeated in the case of deletion.
Apurva Kaushal