web form open in new tab dynamically in asp.net - asp.net

I have a master page. And a tab container is on the Master page. This master page have a menu. Now I want that Click on the Menu item, the WebForm/UserControl open in the tab panel in the tab container dynamically with closing button. Please help me.

The page will post-back normally , but if you use Ajax then it will look like clicking on the master page link loaded the tab content dynamically.
Can help more if you can post your code.
If you like to have a popup panel with close button (didn't understand your question properly) use model popup extender.

Related

how to open modal dialog within Repeater control in asp.net

I have a scrolling photo gallery in home page where there is some message in the bottom photo gallery it display only 120 character and there is a link says "continue reading" when I clicked on that link a modal dialog should be opened and it displays message from database.
These photos are continues moving and the photos are coming from database so that for that functionality I am using repeater. Photos are scrolling successfully but messages are not displayed.
I am little bit confusing how to do this so please help me.Thanks in advance..!
You can use a model popup extender from ajax control toolkit
http://www.ajaxcontroltoolkit.com/ModalPopup/ModalPopup.aspx
Or you can make a modal popup your own with simple css and javascript (jquery)
Try with jquery ui
http://jqueryui.com/dialog/

how to show popup with user control when clicking a button in webform?

i want to create a popup window when clicking on a button in webform and after that i want to show a user control in that popup.how to do in asp.net?
i tried with some jquery methods but nothing happens when clicking button?
i want to create a popup window when clicking on a button in webform and after that i want to show a user control in that popup.how to do in asp.net?
i tried with some jquery methods but nothing happens when clicking button?
Think about using an IFrame to achieve this, from the sounds of what you are talking an IFrame would suffice and provided the needed functionality.
<iframe src="YOUR PAGE HERE"></iframe>
There's a lot more you can do with it, these are just the tags to get you going.

loading different pages in Iframe on button click, button is in main page

I have a back and next buttons and Iframe in main page.
On pressing next button next pages (which are forms to take input) are displayed in Iframe from server side.
I want to save data of current page in DB and then load 2nd page in Iframe. On clicking again save data of Page2 in DB and then load 3rd page in Iframe.
Similarly if user clicks back button he should get data of previous page.
Please suggest me how it can be achieved.
Thanks
To chane iframe src just use JS
function changeFrm(NewSrc){
document.getElementById('YOUR IFRAME ID').src=NewSrc;
};
And in your button add onClick="ChangeFrm('NEW SOURCE');"
Good luck!

Facncybox in Jquery

I am using jquery.fancybox-1.2.1.js of fancy box in asp.net application
Q1: In the base page I have datagrid and on combobox. On selection of combobox, the datagrid is populated.
From the datagrid I open the fancybox when user click on Edit link. I open new page like
In EditProjectTask.aspx I have the controls in edible mode. Now if user closes the window using default icon provided in fancybox, then if user selects some other option from combobox the url changes into EditProjectTask?Task= 86
Q2: #
From the # datagrid I open the fancybox when user clicks on Edit link. I open new page like
In EditProjectTask.aspx I have the controls in edible mode. Now when user updates the the content, I want to close the fancybox and also refresh the parent window.
I have achieved this using
After update i #
But it reloads all the pages. Can I use some Ajax call?
I am not sure about how you would use fancybox for this but here is a great post explaining how you edit your gridview's data using jquery dialog

Is there a way to open another page using ModalPopup Extender?

I was wondering if there is way to open another page using a Modal Popup Extender?
and if there is can someone please the tell me how do i go about doing it ..
Thanx
Owais
You could probably put an iframe pointing to the page within the Modal Popup Extender, however that would be a bit of a hack. I would recommend putting whatever content on that page into a user control and then referencing that control from both the original page and the page with the modal popup.
Try using an HTML iframe as the target control of the extender. The iframe tag has a "src" attribute that should point to the page you want to show in the dialog.
You have to think about it w/o the illusion - fundamentally the modal popup is just a DIV. So the question is "can you display a different page in a div?". Iframe... or perhaps a webservice call.
you can use a user control and load it dynamically into the modal popup
Dim ctrl As Control
ctrl = Me.Page.LoadControl("~/control/cmsbar.ascx")
ctrl.id="ctrlx"
Placeholder1.Controls.Add(ctrl)
popup.Show()
note that the popup will have a placeholder to add the control to. you must give the user control an id so the viewstate can be loaded for the control . this code must be placed in the Page_Init event so when the user control is created for the second time it loads its view state

Resources