Click here to Skip to main content
15,891,708 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have a pop up which consist of gridview.Gridview consist of default 3 rows.The gridview each row has few textboxes and drop down list and file upload control. one textbox is for payment and one for balance. when i pay , balance get calculated. First, i placed the pop up in update panel and dynamically created row for gridview in textchange event of payment textbox,It's working but it gave problem wiht file upload and down load. So, i created the rows for gridveiw by javascript on drop down list change event. But row created by javascript are available in code behind.
How to solve the problem. I need the rows to be added dynamically without post back and also supporting file upload and download.
Posted
Comments
Sergey Alexandrovich Kryukov 20-Dec-13 1:05am    
Why "without post back"?!
—SA

1 solution

Your request for "rows to be added dynamically without post back" is simply self-contradictory. What you do with Javascript (and which can be done in a most convenient way using jQuery) happens only on the client side. From the standpoint of the ASP.NET application, it's server side (code behind), you new rows simply do not exist. So, what would you expect?

Nothing happens on the server side before you send some HTTP request from the client side. One of the way to do it directly is using Ajax:
http://en.wikipedia.org/wiki/Ajax_%28programming%29[^],
http://www.xul.fr/en-xml-ajax.html[^].

And just one of the convenient ways of using Ajax is the jQuery Ajax: http://api.jquery.com/jQuery.ajax[^].

If you need to learn jQuery (highly recommended), please see:
http://en.wikipedia.org/wiki/JQuery[^],
http://jquery.com[^],
http://learn.jquery.com[^],
http://learn.jquery.com/using-jquery-core[^],
http://learn.jquery.com/about-jquery/how-jquery-works[^] (start from here).

—SA
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900