16,013,440 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 .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 Aashish vermaa (Top 17 by date)
Aashish vermaa
19-Nov-14 5:20am
View
thanks
Aashish vermaa
29-Sep-14 5:53am
View
Is this fee tool or paid?
Aashish vermaa
29-Sep-14 2:56am
View
I want to ignore same data without html tag using where clause in entity framework query.
Aashish vermaa
19-Sep-14 7:39am
View
I means how could we code in Entity framework to achieve facility like roll-back in case of any issue.
Aashish vermaa
16-Sep-14 6:27am
View
a few seconds ago|LINK
But I want to dynamical add css classes and also want to call javascript method "EditUrl();" together.
I am using the following code:
@Html.ActionLink("Single Choice", "SingleChoice", "Question", new { sectionid = "0" }, (ViewBag.Type == 1 || ViewBag.Type == 4 || ViewBag.Type == 5) ? new { @class = "ancbtnClass editUrl" } : new { @class = "ancdisableCss" })
Please advise.
Thank you,
Aashish vermaa
15-Sep-14 7:02am
View
If I want to change the CSS of a particular "ActionLink".
Aashish vermaa
12-Sep-14 7:36am
View
Thank you very much for your support.
I did like this and this is working fine:
AssessmentClass objAssessment = new AssessmentClass();
objAssessment.assessment_id = resAssessment[0].assessment_id;
objAssessment.title = resAssessment[0].title;
objAssessment.description = resAssessment[0].description;
lstAssessment.Add(objAssessment);
Aashish vermaa
12-Sep-14 6:38am
View
I code as you suggests me but the issue arise when i try to set the property of child list type class.
What I am doing wrong in the code?
Aashish vermaa
12-Sep-14 4:00am
View
I am doing like this:
controller code:
----------------
AssessmentClass lstAssessment = new AssessmentClass();
var resAssementSection = (from objSection in DbEntitiy.SECTIONS
join objAssementSection in DbEntitiy.LK_ASSESSMENTS_SECTIONS on objSection.section_id equals objAssementSection.section_id
where objAssementSection.assessment_id == 138
select new
{
objSection.section_id,
objSection.title
}).ToList();
if (resAssementSection.Count > 0)
{
for (int i = 0; i < resAssementSection.Count; i++)
{
//lstAssessment.section[i].sectionId = Convert.ToInt32(resAssementSection[i].section_id);
lstAssessment.section[i].title = resAssementSection[i].title;
var resSectionQuestion = (from objQuestion in DbEntitiy.QUESTIONS
join objSectionQuestion in DbEntitiy.LK_SECTIONS_QUESTIONS on objQuestion.question_id equals objSectionQuestion.question_id
where objSectionQuestion.section_id == resAssementSection[i].section_id
select new
{
objQuestion.question_id,
objQuestion.question1
}).ToList();
if (resSectionQuestion.Count > 0)
{
for (int j = 0; j < resSectionQuestion.Count; j++)
{
lstAssessment.section[i].question[j].questionId = resSectionQuestion[j].question_id;
lstAssessment.section[i].question[j].question = resSectionQuestion[j].question1;
}
}
}
Class file:
-----------
public class AssessmentSectionClass
{
public int sectionId { get; set; }
public string title { get; set; }
private List<sectionquestion> _SectionQuestion = new List<sectionquestion>();
public List<sectionquestion> question { get { return _SectionQuestion; } }
}
public class SectionQuestion
{
public int questionId { get; set; }
public string question { get; set; }
}
Now I am getting the following error when I assigning the question value to the property in the controller:
Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
Please suggest, how I fixed it?
Aashish vermaa
12-Sep-14 2:50am
View
It is giving the following error at list type property: must declare a body because it is not marked abstract or extern. Automatically implemented properties must define both get and set accessors
Aashish vermaa
10-Sep-14 8:36am
View
But in my scenario class and students both comes in bulk.
so what will be the class and cshtml file?
Aashish vermaa
9-Sep-14 7:20am
View
Not like this.
I want to write a sp where I pass the table name and could download the CSV file.
Aashish vermaa
1-Sep-14 9:04am
View
solution is:
@Convert.ToDateTime(item.lastUpdate).ToString("dd MMM yyyy")
Aashish vermaa
1-Sep-14 8:53am
View
No overload for method 'ToString' takes 1 arguments
<tr>
<td>Last Update
@item.lastUpdate.ToString("dd MMMM yyyy")
Aashish vermaa
1-Sep-14 8:42am
View
now I am getting this error message:
No overload for method 'ToString' takes 1 arguments
Aashish vermaa
1-Sep-14 8:03am
View
I am showing data using foreach loop on the cshtml page like this:
<tr>
<td>Last Update
@Html.DisplayFor(modelItem => Convert.ToDateTime(item.lastUpdate).ToString("dd MMM yyyy"))
</td>
</tr>
But getting the following error while using this code:
Templates can be used only with field access, property access, single-dimension array index, or single-
parameter custom indexer expressions.
Please suggest some solution.
Aashish vermaa
19-Aug-14 4:24am
View
In that case where changes take places in view, controller and model as well.
Show More