如何避免选项卡上的回发单击以加载页面/部分

时间:2022-12-04 20:47:09

I am using .NET, XSLT to achieve below functionality, however there is some challenges we are facing.

我使用.NET,XSLT来实现以下功能,但是我们面临着一些挑战。

I have to implement tab functionality on a page. I have got 4 different pages.

我必须在页面上实现选项卡功能。我有4个不同的页面。

1) index.aspx 2) g.aspx 3) f.aspx 4) s.aspx

1)index.aspx 2)g.aspx 3)f.aspx 4)s.aspx

tab1|tab2|tab3|tab4 (Will appear on screen)

tab1 | tab2 | tab3 | tab4(将出现在屏幕上)

"index.aspx" will be my landing page, having the tabs control in it i.e. "tab1" will be selected default with "index.aspx" page open. when user click on "tab2" it will open "g.aspx",normally opening this page is very easy,however I need that there should not be any postback, so something ajax concept will happen. If it has been normal text page, it would have very easy to implement this, however there could be .net usercontrols on that page and they may give postback while using them and also we can have JAVASCRIPT "disabled" too. I have pasted the below example code from g.aspx which will be get rendered when user click on "tab2".

“index.aspx”将成为我的登录页面,其中有选项卡控件,即默认选择“tab1”并打开“index.aspx”页面。当用户点击“tab2”时它将打开“g.aspx”,通常打开这个页面非常容易,但是我需要不应该有任何回发,所以ajax概念会发生。如果它是普通的文本页面,它将很容易实现,但是在该页面上可能有.net用户控件,并且它们可能在使用它们时给予回发,并且我们也可以使JAVASCRIPT“禁用”。我已经粘贴了g.aspx中的以下示例代码,当用户单击“tab2”时将会呈现该代码。

<div class="tabs-container" id="tabs" style="display: block;">
    <div class="contentContainer">
        <p>
            View your New Delhi flights!
        </p>
                <ucFS:ctlDestinationFS ArrivalDate="02/02/2011" DepartureDate="02/02/2011" runat="server" ArrivalStationCode="DEL" />
    </div>
</div>

Below are the challenges we are facing to achieve this functionality.

以下是我们实现此功能所面临的挑战。

1) There should not be any postbacks. 2) Normal text pages can be taken, however what to do for the .net usercontrols. 3) There can be javascript disabled for that page.

1)不应该有任何回发。 2)可以采用普通文本页面,但是如何处理.net用户控件。 3)该页面可以禁用javascript。

Can anybody share his thought how to achieve this functionality.

任何人都可以分享他的想法如何实现这一功能。

Thanks,

谢谢,

Best Regards, Manoj

最诚挚的问候,Manoj

1 个解决方案

#1


1  

Cross browser tabbed pages with embedded links at cssplay by Stu Nicholls might help, if you can:

如果可以的话,Stu Nicholls在cssplay上使用嵌入式链接的跨浏览器选项卡页面可能会有所帮助:

  • Provide tabs in divs
  • 提供div中的选项卡
  • Load all user controls on PageLoad
  • 在PageLoad上加载所有用户控件
  • And then switch through tabs
  • 然后切换标签

#1


1  

Cross browser tabbed pages with embedded links at cssplay by Stu Nicholls might help, if you can:

如果可以的话,Stu Nicholls在cssplay上使用嵌入式链接的跨浏览器选项卡页面可能会有所帮助:

  • Provide tabs in divs
  • 提供div中的选项卡
  • Load all user controls on PageLoad
  • 在PageLoad上加载所有用户控件
  • And then switch through tabs
  • 然后切换标签