TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
venkata saibabu
NA
8
0
popup window
Mar 14 2009 5:29 AM
hai,
i could not able to open a popup window in a page _load event ,iam using javascript function ,below is my code .so ,please help me
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
if (Session["Admin_Id"] != null)
{
//Lbladminname.Text = "Hi" + Session["username"].ToString();
// Response.Write(Session["username"].ToString());
//Lbladminname.Text = "Dear" + Session["username"].ToString();
//showlastlogindata();
showlastlogindata();
Label lbl = (Label)Master.FindControl("Lbladminname");
Label lblt = (Label)Master.FindControl("Lbltime");
if(lbl !=null)
{
lbl.Text =" Welcome " + Session["username"].ToString().Trim();
}
if (lblt != null)
{
lblt.Text = DateTime.UtcNow.ToLongDateString().ToString();
}
//HttpCookie mycookie = Request.Cookies["link"];
if (Session["link"] != null)
{
//Response.Write(Session["link"].ToString());
Response.Redirect("PropertyViews.aspx");
}
else
{
OpenNewWindow("Remainder.aspx");
}
//Lbllastlogin.Text = Session["username"].ToString();
}
else
{
Response.Redirect("Adminlogin.aspx");
}
//addlogs();
}
}
public void OpenNewWindow(string url)
{
//ClientScript.RegisterStartupScript(this.GetType(), "newWindow", string.Format("<script>window.open('{0}',url,'winFeatures');</script>"));
string winFeatures = "toolbar=no,status=no,menubar=no,location=center,scrollbars=no,resizable=no,height=300,width=400";
//ClientScript.RegisterStartupScript(this.GetType(),"newWindow", string.Format("<script type='text/javascript'>window.open('{0}', 'yourWin', '{1}');</script>", url, winFeatures));
ClientScript.RegisterStartupScript(this.GetType(), "newWindow", string.Format(@"<script type=""text/javascript"">window.open('{0}', 'yourWin', '{1}');</script>", url, winFeatures));
}
sp ,please check the above code and find me a solution please
thanks in advance
sai
Reply
Answers (
2
)
Easiest way to save a Visual C# 2008 as a 2005 project?
Is it possible ......