0MV1 0MV1 - 1 year ago 64
Vb.net Question

How to get dynamic created table's total column and row using Request.Form in vb.net

I am doing my project in Vb.net using MVC 4.0

I have created dynamic table and in that textboxes in td using javascript and now i want to get that table's total row and column as well for further process in Controller function.

How I can get using above using VB.net?

I have used Request.Form but the id of the textboxes in table is created uniquely so first I want to find the total column and row so based on that I can move further and check using for loop.

Answer Source


I got all the controls on code behind by it's name by using FormCollection just i need to do is post back the form using form action method because with using ajax i am not getting the formcollection in code behind but directly using form action method i can get all the controls name. enter image description here

These are the textbox ids by which i can get the value just need to do further process like:

For Each _formvalues As String In formcol

fomcol is an object of FormCollection,_formvalues is used for moving one by one name coming in formcol and to take the data inside means name just write formcol(_formvalues) that's it.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download