Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8055613
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T08:26:36+00:00 2026-06-05T08:26:36+00:00

I am having Default.aspx Page for Login. After Successful Login it shows the ItemValuation.aspx

  • 0

I am having Default.aspx Page for Login. After Successful Login it shows the ItemValuation.aspx Page but in the address bar the link shown is Default.aspx. The problem started after I implimented the jquery in my Project. If I remove the jquery
references and Code then link shown is correct after login i.e. ItemValuation.aspx
Can any one tell me how can I solve this Problem? After successful Login on Default.aspx the link shown in address bar should be ItemValuation.aspx For your reference I am posting the Default Page aspx code.
Thanks in Advance.

   <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="Item_Valuation.Default"  %>

<!DOCTYPE html  >

<html >
<head runat="server">
<link rel="shortcut icon" href="~/Images/ACME.ico">
    <title>Login</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0;"/> 
    <link href="css/jquery.mobile-1.1.0.min.css" rel="stylesheet" type="text/css" />
    <link href="css/jquery-ui-1.8.18.custom_mini.css" rel="stylesheet" type="text/css" />
    <script src="js/jquery-1.7.1.min.js" type="text/javascript"></script>
    <script src="js/jquery.mobile-1.1.0.min.js" type="text/javascript"></script>

</head>

<body >
 <div data-role="page" id ="loginpage" data-theme="c" >
    <form id="formLogin" runat="server" >

    <div id ="DivHeader" data-role="header"  data-position="fixed" data-theme="c"  >
   <div style="text-align:center;top:4px;">
        <asp:Image ID="Image1" runat="server" 
            ImageUrl="Images/ItmVlun.jpg"   />
   </div>
    </div>
    <div data-role="content" style=" margin-top: 2px;">
    <table style="text-align:right;width:100%">
    <tr>

    <td style="width:80%" >
    <table  style="border-color: #FFCC00;width:100%;left:5%; text-align:left;">

    <tr>
      <td style="width:50%;"><asp:Label ID="lblLogin" runat="server" Text="Login:" 
              Font-Bold="False" Font-Names="Copperplate Gothic Light" Font-Size="Large"></asp:Label>
         </td>
      <td style="width:50%;"><input id="txtUserName" type="text" runat="server" style="width:100%;font-size:large;"   /></td>
      <td><ASP:RequiredFieldValidator ControlToValidate="txtUserName"
           Display="Static" ErrorMessage="*" runat="server"  
           ID="vUserName" /></td>
      </tr>

   <tr>
      <td >
          <asp:Label ID="lblPassword" runat="server" Text="Password:" Font-Bold="False" 
              Font-Names="Copperplate Gothic Light" Font-Size="Large"></asp:Label>
       </td>
      <td  ><input id="txtUserPass" type="password" runat="server" style="width:100%;font-size:large;"   /></td>
         </tr>
   <tr>
      <td >
          <asp:Label ID="lblRememberMe" runat="server" Text="Remember Me:" 
              Visible="False" Font-Names="Copperplate Gothic Light"></asp:Label>
       </td>
      <td >
          <asp:CheckBox ID="chkPersistCookie" runat="server" autopostback="false" 
              Visible="False" />
       </td>
      <td ></td>
   </tr>

   </table>
   </td>
   <td style="width:20%;"> 
       <asp:Image ImageAlign=Right ID="Image2" runat="server" 
           ImageUrl="~/Images/LogInimg.jpg"  Width="100%" Height=60% />
   </td>
        </tr>
      </table>  

</div>
  <div  data-role="footer"  data-position="fixed" data-theme="c">

  <asp:Button ID="btnLogIn" runat="server" OnClick="LogMe_Click"
      Text="Log in" data-theme="a"  CausesValidation="False" data-role="button"  data-inline="true" style=" float : left;"  />
  <input type="button" ID="CloseButton"  value="Close" onclick ="window.close();" />
  <asp:Label ID="lblMsg" runat="server" ForeColor="#FF0066"  style=" float : Right;" ></asp:Label>
    </div>

    </form>

    </div>

</body>

</html>

//Default.cs

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls; 
using System.Web.Security;
//using System.Web.UI.MobileControls;
using System.Runtime.InteropServices;


namespace Item_Valuation
{
    public partial class Default : System.Web.UI.Page
    {

       // internal static extern int lineGetGeneralInfo(IntPtr hLine, byte[] bCache);
        //public static string IMEI;
        Item_Valuation.User usr;
        public static string message="";
        public string AuthorisationMsg;

        protected void Page_Load(object sender, EventArgs e) 
        {
            try
            {

                if (!IsPostBack)
                {
                    if (Request.QueryString["TCPServer"] != null)
                    {
                        AuthorisationMsg = Request.QueryString["TCPServer"].ToString();
                        GlobalData.SetSettings();
                        lblMsg.Text = "Error: TCP Server IP " + GlobalData.TCPServer + " " + AuthorisationMsg;
                    }
                    else if (Request.QueryString["Message"] != null)
                    {
                        lblMsg.Text = Request.QueryString["Message"].ToString();
                    }


                }

                txtUserName.Focus();
            }
            catch (Exception ee)
            {
                lblMsg.Text = ee.Message;
            }

       }



        private bool ValidateUser(string userName, string passWord)
        {
            if ((null == userName) || (0 == userName.Length))
            {
                return false;
            }


            try
            {
                string msg = "";
                Item_Valuation.User Usr = Item_Valuation.User.CheckLogin(userName, passWord, ref msg);

                if (msg.Length > 0)
                {
                    lblMsg.Text = msg;
                    Response.Write("<script>'alert("+lblMsg.Text +"')</script>"); 
                    return false;
                }
                if (Usr != null)
                {

                }
                else
                {
                    lblMsg.Text = "Invalid Login id or Password";
                    Response.Write("<script>'alert(" + lblMsg.Text + "')</script>"); 
                    return false;
                }
            }
            catch (Exception ex)
            {
                // AcmePayRollBusiness.PayRollError.PostError(this.GetType(), ex, "Error while validating User");
                return false;
            }

            return true;

        }

        public void LogMe_Click(object sender, EventArgs e)
        {
            if (ValidateUser(txtUserName.Value, txtUserPass.Value))
            {
                FormsAuthenticationTicket tkt;
                string cookiestr;
                HttpCookie ck;

                tkt = new FormsAuthenticationTicket(1, txtUserName.Value, DateTime.Now,
                  DateTime.Now.AddMinutes(30), chkPersistCookie.Checked, "your custom data");
                cookiestr = FormsAuthentication.Encrypt(tkt);
                ck = new HttpCookie(FormsAuthentication.FormsCookieName, cookiestr);
                if (chkPersistCookie.Checked)
                    ck.Expires = tkt.Expiration;
                ck.Path = FormsAuthentication.FormsCookiePath;
                Response.Cookies.Add(ck);

                string strRedirect=null;
                //strRedirect = Request["ReturnUrl"];

                usr = (Item_Valuation.User)HttpContext.Current.Session["User"];
                int roleLevel = usr.RoleLevel;

                if (roleLevel != 1)
                {
                    if (strRedirect == null)
                        strRedirect = "ItemValuation.aspx";

                }
                else
                {
                    if (strRedirect == null)
                        strRedirect ="PrinterAssignment.aspx";

                }
                Response.Redirect(strRedirect);
                //Server.Transfer(strRedirect);

            }

        }



}

}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T08:26:37+00:00Added an answer on June 5, 2026 at 8:26 am

    jQuery Mobile is the one that’s doing that. By default, it changes all links and form submissions through AJAX.

    To disable this… interesting… functionality, you need to add a handler to the mobileinit event, and set ajaxEnabled to false.

    Docs here on how exactly to do this: http://jquerymobile.com/demos/1.1.0/docs/api/globalconfig.html

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am having a default page namely default.aspx in this i will have panel.
i have default.aspx page and one user control. usercontrol is having following code for
Having this routes.MapRoute( ShowPage, default.aspx/{page}/{pagetype}, new { controller = Info, action = PageASPX, page
I am having a problem assigning a default value to my Spring Form input
I am having trouble deploying express app on nodester. After successfully running the default
i am having no problem at all compiling/debugging my web app, but when i
I am having an aspx page where I have added one asp.net text box
I have a JavaScript alert popup on my page. Problem I am having with
In my default.aspx page, I have some ESRI tools (and some commands) in a
I have 2 user controls in an ASPX page. By default the second user

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.