[RESOLVED] How to Open a tab in a multiview

Hi all i want to do is:

onclick the button.......the view of the multiview  control should dispalyed just as a new tab is shown with the previous view of the multiview...

The detail is: 

I am using a multiview in my website..........All i need is whenever a button is clicked in a view of the entire miltiview control.....instead of opening the resultend page on the other window.....i want to open a (tab like) view  in multiview that displays the result while the previous view remains open ......how would i can acheive this

I am not sure if i understood your question properly, but i think you need tab control of some sort...so I am proposing AJAX Tab Container...http://www.asp.net/ajaxlibrary/AjaxControlToolkitSampleSite/Tabs/Tabs.aspx 

Thanks,

Refering to your provided link let me clear my question:

As you can see in your link that there are 3 tabs namely (1)Signature & Bio (2)Email (3)Controls ............now friend what i need is...............

As there is a Save button in the "Signature & Bio" tab.... all i need is to have the same thing but in a manner that firstly only the "Signature & Bio" tab should be appeared than after clicking the Save button the second tab should be appeared of Email..................and so on

Hope i am able to clarify my question.....

mmazeemahmad

As there is a Save button in the "Signature & Bio" tab.... all i need is to have the same thing but in a manner that firstly only the "Signature & Bio" tab should be appeared than after clicking the Save button the second tab should be appeared of Email..................and so on

I think ASP.Net Wizrd works for you - http://www.codeproject.com/KB/aspnet/Wizard_Control.aspx 

Thanks,

hi,

in pageload:

set multiview1.ActiveIndex=0;

and in save button write:

multiview1.ActiveIndex=1;

and so on......

Otherwise if u have the knowledge of JQuery, it becomes more simple. As View and Multiview are asp.net controls, postback will occur each and every time. So to avoid this, try to use JQuery Tabs.

All the best!

Dear  shiva.ram24 i want to hide all of the view's when page load and than onclicking any button i want to show those views as tabs with the previous views..............that's it............kindly tell me the full solution for it...................

Dear ramiramilu this wasn't what i needed kindly guide me little more.....

Ofcourse u can do that...

just do..

View1.Visible = false;

I think it will work surely!

Dear shiva.ram24 if u can provide me some demo code than i would be ery thankful to you...............

        <asp:MultiView ActiveViewIndex="0" runat="server" ID="MultiView1">
<asp:View ID="ViewLand" runat="server">
<asp:Button Text="save" runat="server" ID="btnSave" onclick="btnSave_Click"/>
</asp:View>
<asp:View ID="View1" runat="server">
<asp:Button Text="Register" runat="server" ID="btnRegister"
onclick="btnRegister_Click"/>
</asp:View>
<asp:View ID="View2" runat="server">
<asp:Button Text="SignUp" runat="server" ID="btnSignUp" onclick="btnSignUp_Click"/>
</asp:View>
</asp:MultiView>

        protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
MultiView1.ActiveViewIndex = 0;
}
}

protected void btnSave_Click(object sender, EventArgs e)
{
MultiView1.ActiveViewIndex = 1;
}

protected void btnRegister_Click(object sender, EventArgs e)
{
MultiView1.ActiveViewIndex = 2;
}

protected void btnSignUp_Click(object sender, EventArgs e)
{
MultiView1.ActiveViewIndex = 0;
}

All the best!

Hi shiva.ram24 your code doesn't open up the view in a new tab instead of it, it replaces the current one and opens in the same window instead of opening in a new tab...............

                <asp:HyperLink NavigateUrl="WebForm1.aspx" runat="server"  onclick="NewWindow()" Text="clickNew window"/>

    <script type="text/javascript">

function NewWindow() {
window.open("WebForm1.aspx");
alert("new window");
}
</script>

follow this link

http://www.dotnetcurry.com/ShowArticle.aspx?ID=178

http://dheerajstechwiki.blogspot.com/2009/12/dynamically-adding-tab-panels-into.html

Dearshiva.ram24

i think that i was unable to clarify my problem.............i want to open a (tab like) view  in multiview that displays the result while the previous view remains open ......but not to open a new tab in my browsers window

follow this link

http://www.dotnetcurry.com/ShowArticle.aspx?ID=178

Yap eworker1 your suggested solution is excellent and did worked, before marking your post as answer kindly tell me the last thing that i want to add the close image on each tab so that user can able to close the tab by clicking on that image would u have any suggestions about it????

ok i have done all the things and now only needs a code to close the current tab of tabcontainer..............i am using an imagebutton and want to write a code behind it to get the tab close or hide....

thoughts on "[RESOLVED] How to Open a tab in a multiview"

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>