16,018,973 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 Visual Basic questions
View Javascript questions
View .NET 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 Member 12097108 (Top 39 by date)
Member 12097108
2-Nov-16 1:28am
View
Hey..I am not able to understood this query can you please give me the example.
Member 12097108
28-Oct-16 1:52am
View
Hello Sir,I have allready get total value but not in proper manner.I was send my output and procedure so can you pleasecheck my procedure and give some proper changis in query so I can get it.
Member 12097108
12-Oct-16 7:34am
View
I dont get it what you are suppose to say.I have only one table.first time we take break so timeIn and timeOut will be store into column of table.now after 1 hour again we take break that time before timein and timeout value will be update to new value and calculate new timeSpent my question is is it possible to store first break timespent dynamically in query if we take new brak that time new break timespent will be added to the old one and give me sum of this time
Member 12097108
12-Oct-16 1:51am
View
Deleted
Sir just I want to ask, according to this
DATEDIFF(minute,StartTimeIn,EndTimeOut)-
(DATEDIFF(minute,MealTimeIn,MealTimeOut) +(DATEDIFF(minute,TeaTimeIn,TeaTimeOut)) as TotalSpentTime
.if teabreak is null then whole value will be null just I want If any break is null then take 0 value.I am really confuse about that.kindly help me please
Member 12097108
10-Oct-16 7:43am
View
Hello Sir Can I ask one more question..?
Member 12097108
10-Oct-16 6:22am
View
Thank you very much sir.
Member 12097108
14-Jul-16 7:48am
View
yes
Member 12097108
14-Jul-16 1:22am
View
Not button clicking.actually sir,suppose I login to system now I click on page1.aspx and wait 1 or 2 minutes then after I load page2.aspx then it should go page2.aspx but in my case when I load page2 then automatically goes to login page .I have done every code and web config file as well as global.asax file bur problem remain same.
Member 12097108
13-Jul-16 6:09am
View
I know that, i already try this with separate but still it will logout after 1 mintues.
Member 12097108
13-Jul-16 2:50am
View
I have already try it.still problem remain same.
Member 12097108
13-Jul-16 2:49am
View
I have already try it. still problem remain same.
Member 12097108
13-Jul-16 2:37am
View
Actually sir I was sended code of my webconfig file.only this one code I have in config file.I try every code which I can get form Google but the problem me remain same.If you have code for solving that can you please help for this.
Member 12097108
13-Jul-16 2:13am
View
yes,I try every code which I can get from Google and which I can put on web config file like <session timeout="20"> and like <authication>....
but the problem is remain same If i dont do anything for 1 minutes my session will expired and ask to again login.
Member 12097108
29-Jan-16 3:58am
View
I know That
but I have created many practical for web services in asp.net.but I know how can send this web service to android developer so he can use in app.
If you have any kind of link regarding to crude opertation using web services in asp.net using jason please help i can solve this practical for this.
Member 12097108
25-Jan-16 8:58am
View
Means I have created web service but now android developer want to use that web service in app. so i don`t know how can i send this web service to android developer.
i can i send url of this web service. I don`t know what i do next.
Member 12097108
21-Jan-16 1:47am
View
Hello Sir,
Thank you for this solution.
But this 5 Values store int one tabel. how can i dispaly first value like startof day after cliking signin button display rest of record.
Member 12097108
17-Dec-15 5:49am
View
sir my database on live ftp server.If you have any kind of way to restore this record please help me for this.
Member 12097108
17-Dec-15 5:16am
View
sir I have in very big problem.
by mistake I have deleted all record from database.please help me how can i take it back all record..please
Member 12097108
16-Dec-15 5:13am
View
Sir I have one question.
according to this coding that i have posted .gridview display record now just i want to display last inserted 10 record so how can i implement in this coding.
can you help me or hint for it.
Member 12097108
16-Dec-15 5:00am
View
Thank you sir..
Member 12097108
16-Dec-15 4:44am
View
Hello Sir...
DateTime date=StaticKeys.getLocaleDatefromUTC();
string constr = ConfigurationManager.AppSettings["Main.ConnectionString"];
using (SqlConnection con = new SqlConnection(constr))
{
con.Open();
using (SqlCommand cmd = new SqlCommand("select CONVERT(VARCHAR CreateDateTime,105)AS LoginDate, TaskTimeIn,RIGHT(CONVERT(VARCHAR,TaskTimeIn,100),7)as TimeIn,TaskTimeOut,RIGHT(CONVERT(VARCHAR,TaskTimeOut,100),7)as TimeOut, TaskDescription FROM DailyTimeSheetTrackers where EmployeeId=@ID AND CreateDateTime=@CT", con))
{
cmd.Parameters.AddWithValue("@ID", UserLog.UserId);
cmd.Parameters.AddWithValue("@CT", date);
using (SqlDataAdapter da = new SqlDataAdapter())
{
cmd.Connection = con;
da.SelectCommand = cmd;
DataSet ds = new DataSet();
da.Fill(ds);
GridView2.DataSource = ds;
GridView2.DataBind();
}
}
}
This is my code.
Incorrect syntax near 'CreateDateTime'. I was get this kind of error I dont how can i solve it.
Member 12097108
9-Dec-15 8:36am
View
Ok sir..I will share my code..
protected void LinkButton2_Click(object sender, EventArgs e)
{
if (ViewState["CurrentTable"] != null)
{
DataTable dtCurrentTable = (DataTable)ViewState["CurrentTable"];
DataRow drCurrentRow = null;
if (dtCurrentTable.Rows.Count > 0)
{
drCurrentRow = dtCurrentTable.NewRow();
drCurrentRow["RowNumber"] = dtCurrentTable.Rows.Count + 1;
dtCurrentTable.Rows.Add(drCurrentRow);
ViewState["CurrentTable"] = dtCurrentTable;
TimeSpan time = new TimeSpan();
for (int i = 0; i < dtCurrentTable.Rows.Count - 1; i++)
{
DropDownList ddl1 = (DropDownList)GridView1.Rows[i].Cells[1].FindControl("DropDownList1");
DropDownList ddl2 = (DropDownList)GridView1.Rows[i].Cells[2].FindControl("DropDownList2");
dtCurrentTable.Rows[i]["Column1"] = ddl1.SelectedItem.Text;
dtCurrentTable.Rows[i]["Column2"] = ddl2.SelectedItem.Text;
TextBox box1 = (TextBox)GridView1.Rows[i].Cells[3].FindControl("TextBox1");
dtCurrentTable.Rows[i]["Column3"] = box1.Text;
Label lbl1 = (Label)GridView1.Rows[i].Cells[4].FindControl("Label2");
System.DateTime time1 = new System.DateTime();
System.DateTime time2 = new System.DateTime();
time1 = DateTime.Parse(ddl1.SelectedItem.Text);
time2 = DateTime.Parse(ddl2.SelectedItem.Text);
TimeSpan ts = time2.Subtract(time1);
lbl1.Text = Convert.ToString(ts);
time = time + ts;
// Label3.Text = Convert.ToString(time);
dtCurrentTable.Rows[i]["Column4"] = lbl1.Text;
DailyTimeSheetTrackers objTimeTracker = new DailyTimeSheetTrackers();
objTimeTracker = new DailyTimeSheetTrackers();
objTimeTracker.EmployeeId = UserLog.UserId;
objTimeTracker.CreateDateTime = StaticKeys.getLocaleDatefromUTC();
objTimeTracker.CreateUserId = UserLog.UserId;
objTimeTracker.TaskTimeIn = DateTime.Parse(ddl1.SelectedItem.Text);
objTimeTracker.TaskTimeOut = DateTime.Parse(ddl2.SelectedItem.Text);
objTimeTracker.TaskDescription = box1.Text;
objTimeTracker.Status = true;
if (!(new DailyTimeSheetTrackersFactory()).Insert(objTimeTracker))
{
//ltrError.Text = objTimeTracker.BrokenRulesList.ToString();
//dvError.Visible = true;
return;
}
}
}
//Insert();
}
Member 12097108
9-Dec-15 7:57am
View
suppose sir,
I have two dropdown and one textbox.
from dropdown1 I was select 8AM
from dropdown2 I was select 9AM
In textbox we enter value like Task1.
after i click on save button.so this 3 record inserted into database.That i have implemented.now when I will refresh the page from (f5) that time this same record again inserted into databse
Member 12097108
3-Dec-15 7:15am
View
Thank you Sir
I have done this.
It was my mistake...Thank you Verymuch sir
Member 12097108
3-Dec-15 6:57am
View
According toMy Earlier code
ts=2:00 .again we select time from dropdown list so we get ts=1:30
now I want 2:00+1:30=3:30
but according to your code
It will print Last value Like 1:30. not calculate them.
Member 12097108
3-Dec-15 6:33am
View
Hello This code I have Implemented.
This is store last value not calculate value
Member 12097108
26-Nov-15 3:42am
View
Hello sir,
Thank you for that.I already try this.It is not working propely according to my requirement.How can i insert 2 dropdown list and 1 textbox values.
Please give me right code for that.
Member 12097108
19-Nov-15 7:02am
View
even i dont get it
Member 12097108
19-Nov-15 6:06am
View
Object reference not set to an instance of an object. this error.
suppoes sir,
Add_click Event
{
TextBox t1=new TextBox();
t1.Id="t1";
PalceHolder.Controls.Add(t1);
}
this code in add button click event
now i want to that value of t1 textbox i want to store in database
for that i wil wrigth code like this
Save_click Event
{
TextBox txtdesc = (TextBox)PlaceHolder1.FindControl("t1");
}
but here txtdesc get null value insted of i want t1 value.so how can i fecth t1 value plz give me right code for that.
Member 12097108
19-Nov-15 5:17am
View
protected void LinkButton2_Click(object sender, EventArgs e)
{
String str = string.Empty;
DropDownList drpstarttime = (DropDownList)PlaceHolder1.FindControl("drpstart");
DropDownList drpendtime = (DropDownList)PlaceHolder1.FindControl("drpend");
TextBox txtdesc = (TextBox)PlaceHolder1.FindControl("txtdesc");
string constr = ConfigurationManager.AppSettings["Main.ConnectionString"];
using (SqlConnection con = new SqlConnection(constr))
{
using (SqlCommand cmd = new SqlCommand("INSERT INTO t2(StartTime,EndTime,TaskDescription) VALUES(@StartTime,@EndTime,@TaskDescription)"))
{
cmd.Connection = con;
cmd.Parameters.AddWithValue("@StartTime", drpstarttime.SelectedItem.Value);
cmd.Parameters.AddWithValue("@EndTime", drpendtime.SelectedItem.Value);
cmd.Parameters.AddWithValue("@TaskDescription", txtdesc.Text);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
}
}
}
Member 12097108
19-Nov-15 5:17am
View
protected void lbtnaddrow_Click(object sender, EventArgs e)
{
Table tbldynamic = new Table();
TableCell tc = new TableCell();
TableCell tc1 = new TableCell();
TableRow tr = new TableRow();
for (int j = 0; j <= i; j++)
{
DropDownList drpstart = new DropDownList();
drpstart.ID = j.ToString();
drpstart.Items.Add(new ListItem("8:00 AM"));
drpstart.Items.Add(new ListItem("8:30 AM"));
drpstart.Items.Add(new ListItem("9:00 AM"));
drpstart.Items.Add(new ListItem("9:30 AM"));
drpstart.Items.Add(new ListItem("10:00 AM"));
drpstart.Items.Add(new ListItem("10:30 AM"));
drpstart.Items.Add(new ListItem("11:00 AM"));
drpstart.Items.Add(new ListItem("11:30 AM"));
drpstart.Items.Add(new ListItem("12:00 PM"));
drpstart.Items.Add(new ListItem("12:30 PM"));
drpstart.Items.Add(new ListItem("1:00 PM"));
drpstart.Items.Add(new ListItem("1:30 PM"));
drpstart.Items.Add(new ListItem("2:00 PM"));
drpstart.Items.Add(new ListItem("2:30 PM"));
drpstart.Items.Add(new ListItem("3:00 PM"));
drpstart.Items.Add(new ListItem("3:30 PM"));
drpstart.Items.Add(new ListItem("4:00 PM"));
drpstart.Items.Add(new ListItem("4:30 PM"));
drpstart.Items.Add(new ListItem("5:00 PM"));
drpstart.Items.Add(new ListItem("5:30 PM"));
drpstart.Items.Add(new ListItem("6:00 PM"));
drpstart.Items.Add(new ListItem("6:30 PM"));
drpstart.Items.Add(new ListItem("7:00 PM"));
drpstart.Items.Add(new ListItem("7:30 PM"));
drpstart.Items.Add(new ListItem("8:00 PM"));
drpstart.Items.Add(new ListItem("8:30 PM"));
drpstart.Items.Add(new ListItem("9:00 PM"));
drpstart.Items.Add(new ListItem("9:30 PM"));
drpstart.Items.Add(new ListItem("10:00 PM"));
drpstart.Width = 150;
tc1.Controls.Add(drpstart);
tr.Cells.Add(tc);
tr.Cells.Add(tc1);
tbldynamic.Rows.Add(tr);
// PlaceHolder1.Controls.Add(drpstart);
DropDownList drpend = new DropDownList();
drpend.ID = j.ToString();
drpend.Items.Add(new ListItem("8:00 AM"));
drpend.Items.Add(new ListItem("8:30 AM"));
drpend.Items.Add(new ListItem("9:00 AM"));
drpend.Items.Add(new ListItem("9:30 AM"));
drpend.Items.Add(new ListItem("10:00 AM"));
drpend.Items.Add(new ListItem("10:30 AM"));
drpend.Items.Add(new ListItem("11:00 AM"));
drpend.Items.Add(new ListItem("11:30 AM"));
drpend.Items.Add(new ListItem("12:00 PM"));
drpend.Items.Add(new ListItem("12:30 PM"));
drpend.Items.Add(new ListItem("1:00 PM"));
drpend.Items.Add(new ListItem("1:30 PM"));
drpend.Items.Add(new ListItem("2:00 PM"));
drpend.Items.Add(new ListItem("2:30 PM"));
drpend.Items.Add(new ListItem("3:00 PM"));
drpend.Items.Add(new ListItem("3:30 PM"));
drpend.Items.Add(new ListItem("4:00 PM"));
drpend.Items.Add(new ListItem("4:30 PM"));
drpend.Items.Add(new ListItem("5:00 PM"));
drpend.Items.Add(new ListItem("5:30 PM"));
drpend.Items.Add(new ListItem("6:00 PM"));
drpend.Items.Add(new ListItem("6:30 PM"));
drpend.Items.Add(new ListItem("7:00 PM"));
drpend.Items.Add(new ListItem("7:30 PM"));
drpend.Items.Add(new ListItem("8
Member 12097108
19-Nov-15 5:15am
View
Deleted
static int i = 0;
protected void lbtnaddrow_Click(object sender, EventArgs e)
{
Table tbldynamic = new Table();
TableCell tc = new TableCell();
TableCell tc1 = new TableCell();
TableRow tr = new TableRow();
for (int j = 0; j <= i; j++)
{
DropDownList drpstart = new DropDownList();
drpstart.ID = j.ToString();
drpstart.Items.Add(new ListItem("8:00 AM"));
drpstart.Items.Add(new ListItem("8:30 AM"));
drpstart.Items.Add(new ListItem("9:00 AM"));
drpstart.Items.Add(new ListItem("9:30 AM"));
drpstart.Items.Add(new ListItem("10:00 AM"));
drpstart.Items.Add(new ListItem("10:30 AM"));
drpstart.Items.Add(new ListItem("11:00 AM"));
drpstart.Items.Add(new ListItem("11:30 AM"));
drpstart.Items.Add(new ListItem("12:00 PM"));
drpstart.Items.Add(new ListItem("12:30 PM"));
drpstart.Items.Add(new ListItem("1:00 PM"));
drpstart.Items.Add(new ListItem("1:30 PM"));
drpstart.Items.Add(new ListItem("2:00 PM"));
drpstart.Items.Add(new ListItem("2:30 PM"));
drpstart.Items.Add(new ListItem("3:00 PM"));
drpstart.Items.Add(new ListItem("3:30 PM"));
drpstart.Items.Add(new ListItem("4:00 PM"));
drpstart.Items.Add(new ListItem("4:30 PM"));
drpstart.Items.Add(new ListItem("5:00 PM"));
drpstart.Items.Add(new ListItem("5:30 PM"));
drpstart.Items.Add(new ListItem("6:00 PM"));
drpstart.Items.Add(new ListItem("6:30 PM"));
drpstart.Items.Add(new ListItem("7:00 PM"));
drpstart.Items.Add(new ListItem("7:30 PM"));
drpstart.Items.Add(new ListItem("8:00 PM"));
drpstart.Items.Add(new ListItem("8:30 PM"));
drpstart.Items.Add(new ListItem("9:00 PM"));
drpstart.Items.Add(new ListItem("9:30 PM"));
drpstart.Items.Add(new ListItem("10:00 PM"));
drpstart.Width = 150;
tc1.Controls.Add(drpstart);
tr.Cells.Add(tc);
tr.Cells.Add(tc1);
tbldynamic.Rows.Add(tr);
// PlaceHolder1.Controls.Add(drpstart);
DropDownList drpend = new DropDownList();
drpend.ID = j.ToString();
drpend.Items.Add(new ListItem("8:00 AM"));
drpend.Items.Add(new ListItem("8:30 AM"));
drpend.Items.Add(new ListItem("9:00 AM"));
drpend.Items.Add(new ListItem("9:30 AM"));
drpend.Items.Add(new ListItem("10:00 AM"));
drpend.Items.Add(new ListItem("10:30 AM"));
drpend.Items.Add(new ListItem("11:00 AM"));
drpend.Items.Add(new ListItem("11:30 AM"));
drpend.Items.Add(new ListItem("12:00 PM"));
drpend.Items.Add(new ListItem("12:30 PM"));
drpend.Items.Add(new ListItem("1:00 PM"));
drpend.Items.Add(new ListItem("1:30 PM"));
drpend.Items.Add(new ListItem("2:00 PM"));
drpend.Items.Add(new ListItem("2:30 PM"));
drpend.Items.Add(new ListItem("3:00 PM"));
drpend.Items.Add(new ListItem("3:30 PM"));
drpend.Items.Add(new ListItem("4:00 PM"));
drpend.Items.Add(new ListItem("4:30 PM"));
drpend.Items.Add(new ListItem("5:00 PM"));
drpend.Items.Add(new ListItem("5:30 PM"));
drpend.Items.Add(new ListItem("6:00 PM"));
drpend.Items.Add(new ListItem("6:30 PM"));
drpend.Items.Add(new ListItem("7:00 PM"));
drpend.Items.Add(new ListItem("7:30 PM"));
drpend.Items.
Member 12097108
19-Nov-15 5:13am
View
yes sure sir
Member 12097108
17-Nov-15 8:04am
View
sir also i did that but i cant store this value in database
Member 12097108
17-Nov-15 8:04am
View
sir this is not my problem.I solve it again i did but it is not work
Member 12097108
29-Oct-15 10:06am
View
I have made aspx page for that.If i run in local that time i can get mail but i publish same page on server the mail functionality not work.
I think i don`t have error in code bcz it run perfect but server dont allow to run properly please give me this solution.
Member 12097108
29-Oct-15 8:01am
View
I dont get any error.i have declare mail function in aspx page it is perfectly run on local machine bt when i publish on server the same page that time mail function is not work.that is my problem just i want to know that what i have to cahnge for this issue.
Member 12097108
29-Oct-15 7:17am
View
Already my project working live on server.but only mail functionlity is not working in local that is done perfectly.give me the solution.
Member 12097108
29-Oct-15 6:42am
View
This aspx page If i will run on local then i can get mail.but when i will publish on server this page run it that time i will not get mail.
Show More