15,904,153 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Raghu S Gowda (Top 16 by date)
Raghu S Gowda
10-Apr-15 1:28am
View
Thank you got it.
Raghu S Gowda
2-Apr-15 2:42am
View
Nope its an image button.
Raghu S Gowda
2-Apr-15 1:58am
View
I have written a code like this:
$(document).ready(function () {
$("#hide").click(function () {
$("#CTI").hide();
});
Its not hiding,just refreshing the page
Raghu S Gowda
1-Apr-15 23:52pm
View
This is my Code please suggest me what changes should i make to work google in that iframe.
default.aspx(start page)
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<frameset cols="80%,20%">
<frame src="frame1.aspx"></frame>
<frame src="frame2.aspx"></frame>
</frameset>
</head>
<body>
<form id="form1" runat="server">
<div>
</div>
</form>
</body>
</html>
frame1.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="frame1.aspx.cs" Inherits="frame1" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<iframe name="myframe" src="http://www.google.com" seamless sandbox id="myframe" width="1240" height="780"></iframe>
</body>
</html>
frame2.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="frame2.aspx.cs" Inherits="Login1" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<style type="text/css">
.auto-style1 {
position: relative;
left: 20px;
top: 0px;
width: 136px;
}
.auto-style2 {
margin-left: 14px;
}
.auto-style3 {
animation: backwards;
color: red;
position: relative;
left: 34px;
top: 16px;
width: 231px;
height: 23px;
}
</style>
</head>
<body>
<frameset border="1" frameborder="1" framespacing="0" cols="80%,20%">
<frame name="leftframe" />
<frame name="rightframe" scrolling="no" >
<form id="form1" runat="server" draggable="false">
<div id="d1" class="auto-style3">
</div>
<br />
<br />
<div>
<asp:Panel ID="Panel1" runat="server">
<asp:Label ID="lbl2" CssClass="l2" Text="UserName" runat="server" />
<asp:TextBox runat="server" ID="username" CssClass="auto-style2" Width="136px" />
<br /><br />
<asp:Label ID="lbl3" CssClass="l2" Text="Password" runat="server" />
<asp:TextBox runat="server" ID="password" CssClass="auto-style1" />
<br /><br />
<asp:Button ID="btn" Text="Login" OnClick="btn_Click" runat="server" CssClass="buttonclass" />
<asp:Button ID="btn1" Text="Clear" OnClick="btn1_Click" runat="server" CssClass="buttonclass"/>
</div>
</form></frame>
</frameset>
</body>
</html>
frame2.aspx.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class Login1 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void btn_Click(object sender, EventArgs e)
{
if (username.Text == "admin")
{
Session["Username"] = username.Text;
Response.Redirect("Progress.aspx");
}
else
{
Response.Redirect("Login1.aspx");
}
}
protected void btn1_Click(object sender, EventArgs e)
{
username.Text = " ";
password.Text = " ";
}
}
Raghu S Gowda
1-Apr-15 4:58am
View
Thank you Chill60.
This is the issue i'm facing could you help me,
This is the error im getting in Google console:
Unsafe JavaScript attempt to initiate navigation for frame with URL 'http://localhost:5199/default.aspx' from frame with URL 'https://www.google.co.in'. The frame attempting navigation is neither same-origin with the target, nor is it the target's parent or opener.
Uncaught SecurityError: Blocked a frame with origin "http://google.co.in" from accessing a frame with origin "http://localhost:5199". Protocols, domains, and ports must match.
Raghu S Gowda
1-Apr-15 0:59am
View
Thanks Prusty.
but i don have global.aspx page since i have created an empty website.
Raghu S Gowda
1-Apr-15 0:57am
View
Thanks for ur info.
Raghu S Gowda
27-Mar-15 6:15am
View
Thank you so much.
every thing sorted,hope you help me whenever i'm stuck with something.
Raghu S Gowda
27-Mar-15 6:02am
View
thank you Sitecore.
for starttime and endtime i need only time to display but here date is also showing.
Raghu S Gowda
27-Mar-15 5:39am
View
Thank you so much its working perfectly.
i need only time but here its showing both date and time can you do the needful.
and also can i store those values to db because you have used literal tags.
Raghu S Gowda
27-Mar-15 5:28am
View
yes....
Raghu S Gowda
27-Mar-15 4:50am
View
public partial class entry : System.Web.UI.Page
{
string con = System.Configuration.ConfigurationManager.ConnectionStrings["CRMConnectionString2"].ConnectionString;
private DateTime startTime = DateTime.Now;
protected void answer_Click(object sender, ImageClickEventArgs e)
{
//string starttime = System.DateTime.Now.ToLongTimeString();
startTime = DateTime.Now;
}
protected void hangup_Click(object sender, ImageClickEventArgs e)
{
Lbl_date.Text = System.DateTime.Now.ToShortDateString();
//string endtime = System.DateTime.Now.ToLongTimeString();
// string duration =endtime - starttime;
//Lbl_dur.Text = duration.ToString();
TimeSpan diff = DateTime.Now - startTime;
Lbl_dur.Text = diff.ToString();
//Lbl_st.Text = starTime;
//Lbl_et.Text = endtime;
Pan_Comm.Visible = true;
}
the output is like this:
Duration:: 00:00:00.6678976
Date:: 3/27/2015
also how to add the starttime and endtime in the hangup event
Raghu S Gowda
27-Mar-15 3:11am
View
Thank you Griff,
Bt i should dispaly the start time and end time in the btn2 click event.
i'm getting the duration like 00:00:00.0640033 for 11sec gap between the two click events.
also its showing the date with the start time ,i need onl start time to display
Raghu S Gowda
27-Mar-15 2:56am
View
Thank you.
i noted the time of btn1 click event n also noted the time of btn2 click event.
in btn2 click event im trying to subtract the both noted times bt im nt able to access the btn1 time variable in btn2 click event method
Raghu S Gowda
27-Mar-15 2:35am
View
Thanks for your reply nav29.
i sorted it out .
i'm facing a new problem now could you help me on the below problem,
How to get the time duration in C# web app
C# ASP.NET
Hi,
I have two image buttons,when the first button is clicked the time should start and when the second button is pressed the time should stop and calculate the duration of time and diaplay all the info like start,end time and duration(it should display once the second button is pressed)
Raghu S Gowda
24-Mar-15 1:51am
View
Thank You Arkadeep.
but the framework is not hiding its just refreshing the page .
the code is as below:
$(document).ready(function () {
$("hide").click(function () {
$("CTI").toggle();
});
});
<asp:imagebutton id="hide" runat="server" imageurl="~/hide.jpg/" xmlns:asp="#unknown">
<frame name="left frame" src="crm.aspx" id="Sage" />
<frame name="right frame" src="Login1.aspx" id="CTI" />
Show More