I have a task to make a parent asp .net application and this parent application is a gateway of all child applications. it means we have a common login page for all child applications. And i am already succeeded in having a common login page using Single Sign on structure. Now the problem is that every application have it's own solution and all are deployed on IIS server under my Parent Website. Now what i want is having a class or method at parent application level which call on at any child page URL hit. I have tried this with global.asax at parent application but could not succeeded. Please help me here if i am wrong at any place. My Login Code

<form runat="server" id="frmLogin">

                    <div class="login-controls-container" id="login-controls">

                        <div class="element-group">
                            <div class="element">
                                <asp:TextBox ID="UserName" runat="server" name="UserName" placeholder="Email"></asp:TextBox>
                            </div>
                        </div>
                        <div class="element-group">
                            <div class="element" style="margin-top: 5px;">
                                <asp:TextBox runat="server" ID="Password" TextMode="Password" placeholder="Password" AutoCompleteType="None"></asp:TextBox>
                            </div>
                        </div>

                        <div class="element-group-end">
                            <div class="element-remember">
                                <input checked="checked" id="RememberMe" name="RememberMe" type="checkbox" value="true"><input name="RememberMe" type="hidden" value="false">
                                <span class="chkbox-label">
                                    <label for="RememberMe">Remember me</label>
                                </span>

                            </div>
                        </div>

                        <div class="element-group">
                            <div class="element">
                                <asp:Button ID="btnLogin" runat="server" Text="Log In" CssClass="btn-text rounded" OnClick="btnLogin_Click" />
                                <input type="button" onclick="btnlogin_click" style="display: none;" class="btn-text rounded" runat="server" value="Log In" />
                            </div>
                        </div>

                        <div class="clear-fix">&nbsp;</div>
                        <div style="text-align: center; color: red;">
                            <asp:Label runat="server" ID="lblMessage" Visible="false"></asp:Label>

                        </div>
                    </div>

                </form>

and my logout code

<form id="form1" runat="server">
                <div class="dropdown" style=" padding-top: 1px;">
                    <button class="btn btn-logout dropdown-toggle" style="font-size: 11px;" type="button" data-toggle="dropdown">
                        <asp:LoginName runat="server" style="color:white;"></asp:LoginName>
                        <span class="caret"></span>
                    </button>
                    <ul class="dropdown-menu">
                        <li><asp:LoginStatus runat="server"></asp:LoginStatus></li>
                    </ul>
                </div>
            </form>

Now problem is that i want to trigger a method whenever user tries to access any child page URL???

Related posts

Recent Viewed