15,896,278 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 ammu11 (Top 21 by date)
ammu11
25-May-17 3:15am
View
@OriginalGriff I have done as you said by changing some code.
code is
string FromDate = DateTime.Now.AddDays(-2).ToString();
string Todate = DateTime.Now.ToString();
if (!String.IsNullOrEmpty(Todate.ToString()) && !String.IsNullOrEmpty(FromDate.ToString()))
{
BookingList = BookingList.Where(s => s.DateTime >= FromDate.ToDateFromString() && s.DateTime <= Todate.ToDateFromString()).ToList();
}
I have changed the code to this, why because only need to show last two days data and in db it has three fields and my problem here is that it is not showing and the count in BookingList is 0. Why is that ??
ammu11
25-May-17 2:37am
View
Can I please change the variable FromDate to item that is
var item = DateTime.Now.AddDays(-1);
then I am getting value for item as "2017-05-24 08:20:12" but in the second line
FromDateString = item.ToString();
here Iam getting null in FromDateString. since I have declared FromDateString as string so I have given item.tostring(), the the value in item is not passing to FromDateString . this is my problem I have checked with debugger
ammu11
25-May-17 2:26am
View
var FromDate = DateTime.Now.AddDays(-1);
when I give this I am getting yesterdays datetime to FromDate but
when I give this
FromDateString = FromDate.ToString();
the value in FromDate is not passing to FromDateString. Why is that ?? currently FromDateString is in string datatype . I need to passthe value in FromDate to FromDateString. Is that possible ?? When I give I am getting null value .
ammu11
25-May-17 2:13am
View
No I var FromDate I am getting the value that is datetime , this datetime in FromDate, I need to get this value to FromDateString, but it is showing as null. How can I get value to FromDateString ??
ammu11
24-May-17 5:01am
View
but where I need to give this ?view ? drop down list ??
ammu11
24-May-17 4:12am
View
sorry I didn't get what you are telling. Can you please explain ??
how can I convert back the id ??
ammu11
23-May-17 3:45am
View
Actually I don't know what to give in @Html.PagedListPager but when giving parameter and without such long parameter the filtering is not working properly
What may be the problem ??
ammu11
8-May-17 10:39am
View
How can I do that, sorry that I am new to mvc and didn't know the correct flow of doing it . can you please explain this ??
ammu11
23-Apr-17 9:25am
View
This answer is perfect and I solved my problem Thank you so much. Can I ask you 1 more doubt if I want to check only the first four letter of the new name that was given, with the matching first four letter in the db ??if the letter matches error message is shown else data is added to the table how can it be possible ??
ammu11
22-Apr-17 21:45pm
View
Deleted
can I do this by joining two tables and delete entries ??
ammu11
18-Apr-17 5:29am
View
when i give i get false instead of name
ammu11
18-Apr-17 4:44am
View
but when I give the code as you said it shows error that 'HtmlHelper<mapping>' has no applicable method named 'Editor' but appears to have an extension method by that name. Extension methods cannot be dynamically dispatched. Consider casting the dynamic arguments or calling the extension method without the extension method syntax.
why is this ?
ammu11
11-Apr-17 6:04am
View
Iam getting the result as List<int> so how can I save to database as int ?
ammu11
11-Apr-17 5:58am
View
can I ask you 1 doubt ?
how to convert List<int> to int? ??
ammu11
11-Apr-17 4:07am
View
but how can I give that ?
ammu11
11-Apr-17 3:55am
View
what is csv ?
ammu11
11-Apr-17 3:46am
View
either by coma seperated list or in seperate row
ammu11
11-Apr-17 3:41am
View
yes when I change List<string> to List<int> , it only take one value of selected checkbox, and gives the error that it cannot implicitly convert from List<int> to int? How can I change that to multiple selction ?
ammu11
11-Apr-17 3:33am
View
I got this but my problem is how can I save the checked checkbox Id to table
ammu11
11-Apr-17 3:24am
View
public JsonResult GetPosts(string id)
{
List<selectlistitem> posts = new List<selectlistitem>();
var postList = this.Getpost(Convert.ToInt32(id));
ViewBag.Postdata= this.Getpost(Convert.ToInt32(id));
var postData = postList.Select(m => new SelectListItem()
{
Text = m.PostName,
Value = m.Id.ToString(),
});
return Json(postData, JsonRequestBehavior.AllowGet);
}
public IList<postmaster> Getpost(int DistrictId)
{
return db.PostMasters.Where(m => m.DistrictID == DistrictId).ToList();
}
ammu11
11-Apr-17 2:23am
View
GetPost is used to give to jquery part which I have shown in my question
Show More