Click here to Skip to main content
15,892,298 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
how to open popup page to edit in grid view control in asp.net by selecting particular row and i have one button as add button which enters details and i want to add in database but when i click it should open popup page to add data in database on the same page
Posted
Updated 15-May-16 17:38pm
v2
Comments
Homero Rivera 15-May-16 15:40pm    
You open pop-ups with javascript, not ASP.NET.
If you are trying to select a row from your gridview, there should be an event which opens a new window with javascript, and include a url in it to load the editable section. Also a parameter that relates your new window to the row you selected is necessary.

Separate pop-up windows is not a recommended practice any more, specially since they can't be opened in dialog mode. It is best to work within the same window.
Sergey Alexandrovich Kryukov 15-May-16 23:32pm    
Agree. It would make a fair formal answer, especially if you add some detail.
—SA

1 solution

I agree with the comment to the question by Homero Rivera. Please see my recent answer where I explain why popup windows are bad and suggest some useful alternatives: Problem in firefox popup windows for web base ASP.NET application[^].

But I don't say that the "modal popup" solution is necessarily what you need. Some other solution which simply change the layout to show some detail on some event ("drill-down") on the same page can be beneficial. For example, you could keep required grid view or its part hidden (presumably "collapsed") until it is needed for a "drill-down" event. Then you can show this element by either moving or hiding other elements or by superimposing it on top. There are numerous designs like that, and some of them are even user-friendly. :-)

—SA
 
Share this answer
 
Comments
Homero Rivera 21-May-16 16:08pm    
5'ed
Sergey Alexandrovich Kryukov 21-May-16 18:44pm    
Thank you, Homero.
—SA

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