C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Forums » .NET » JavaScript »

How to check whether an url is opened already


Posted Date: 12 Nov 2008      Posted By: Sathish      Member Level: Silver     Points: 1   Responses: 2



Hi

Is there a way to solve this. I will be opening a webpage say, www.xyz.com. In this site I will be having list of menus again which one of them will point to www.xyz.com. On click of each menu, I need to check whether that site is opened already. If yes, I will reload it else open it newly. It works fine for all urls except the self one mentioned above. Can anyone help me to resolve this.





Responses

Author: Shankar Suresh    18 Nov 2008Member Level: GoldRating: Revenue Score: 0     Points: 0

hi....

you can open this blog u can get answer.......

http://shandotnetsolutions.blogspot.com
http://codeprojectsolutions.blogspot.com

Thanks
shankar



Author: Pradeep Iyer    27 Nov 2008Member Level: DiamondRating: 2 out of 52 out of 5     Points: 6

private void Page_Load(object sender, System.EventArgs e)
{
if(Session["UserId"].ToString()== null)
{
Response.Redirect("login.html");
}
else
{

if (Page.IsPostBack == false)
{

if (Session["AuditLog"].ToString () == "Yes")
{
string strLoggedUserID ="";
int intBankID;
string strSQL;
intBankID = Convert.ToInt32(Session["BankCode"].ToString());
strLoggedUserID = Session["UserId"].ToString();

String HostName;
HostName=Dns.GetHostName();
IPHostEntry IpEntry=Dns.GetHostByName(HostName);
IPAddress[] addr=IpEntry.AddressList;
string sIPADDR = "";
for (int i = 0; i < addr.Length; i++)
{
sIPADDR = sIPADDR + addr[i].ToString();
}

AuditTrail AObj = new AuditTrail(strLoggedUserID,"LogIn",intBankID,sIPADDR);
AObj.SaveLoginDetail();
Session["AuditLog"] = "No";

strSQL = "UPDATE USERS SET LASTIPADDRESS = '" + sIPADDR + "' WHERE USERID = '" + strLoggedUserID + "'";
IDbCommand cmdUpdateQuery = DAL.CreateCommand(strSQL);
cmdUpdateQuery.CommandType = CommandType.Text;
DAL.ExecuteNonQuery(cmdUpdateQuery);
}
}
//End for PCI Changes
}
}

Regards,
Pradeep Iyer



Post Reply

 This thread is locked for new responses. Please post your comments and questions as a separate thread.
If required, refer to the URL of this page in your new post.


Next : Enter Problem in Autocomplete Textbox
Previous : page scrolling problem using javascript
Return to Discussion Forum
Post New Message
Category: JavaScript

Related Messages



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use