16,022,752 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 DT_2 (Top 37 by date)
DT_2
19-Feb-24 23:01pm
View
Duplicate records means below
CustNum|IsPlatform|Parent
253 |0 |253
253 |0 |132
253 |0 |0
What I need is as below
CustNum|IsPlatform|Parent
253 |0 |132
132 |0 |0
DT_2
19-Feb-24 9:33am
View
this is giving the duplicate records. @CHill60
DT_2
19-Feb-24 9:33am
View
WITH cte AS
(
SELECT CustomerId, ISSCustId, CustomerName, CustomerNum, IsPlatform, CustomerNum As TopParent
FROM [dbo].[VwCustomer]
--WHERE ParentCustomerNum = 0
UNION ALL
SELECT T.CustomerId, T.ISSCustId, T.CustomerName,
T.CustomerNum, T.IsPlatform, cte.TopParent
FROM [dbo].[VwCustomer] As T
JOIN cte
ON T.ParentCustomerNum = cte.CustomerNum
)
SELECT *
FROM cte
WHERE cte.CustomerNum = 253
ORDER BY TopParent DESC;
DT_2
18-Mar-19 3:58am
View
Hi, Did you get any solution over there? I need some guidance, how to start. I want an extension where i will press the extension image and feedback form will open. Please help in any way.
DT_2
18-Jan-16 4:47am
View
Thanks Sergey for your comment.
Below link has done my job.
http://stackoverflow.com/questions/26396468/how-to-set-text-box-value-to-upload-filename-using-javascript
DT_2
12-Jan-16 0:38am
View
Below code I have done so far:
$("#txtFirstRegularPayment").datepicker({
dateFormat: 'dd/mm/yy',
buttonImage: '../Content/images/manage_events.png',
buttonImageOnly: true,
changeMonth: true,
changeYear: true,
showOn: 'both',
//maxDate: +15,
defaultDate: '+15d'
});
DT_2
8-Jan-16 7:26am
View
If I update only file1, than I am getting proper value for file1, but in file2, file3, file4 I am getting null value. But there is the previous values stored and I am displaying the images for the same. This condition is in the arising in Edit Post Action.
DT_2
8-Jan-16 0:15am
View
There are 4 different browse buttons like bellow :
=====View Code====
<input type="file" name="file1"/>
<input type="file" name="file2"/>
<input type="file" name="file3"/>
<input type="file" name="file4"/>
====Action Code====
public ActionResult Edit(HttpPostedFileBase file1, HttpPostedFileBase file2, HttpPostedFileBase file3, HttpPostedFileBase file4){
----here is my code to save the file----
}
now when I update only file1 i get the null in other, i.e., in file2, file3 and file4.
DT_2
6-Jan-15 9:04am
View
@Nathan Sir, I tried it but didn`t get any solution can you post a dummy code?Like than I can manage it into my code.
DT_2
6-Jan-15 6:10am
View
[Redundant code removed — SA]
DT_2
6-Jan-15 6:06am
View
[Redundant code removed — SA]
DT_2
6-Jan-15 5:53am
View
I have tried for 24 hours after registering the patient,and I ma successful in that, not for my condition in question?
DT_2
11-Oct-14 8:14am
View
ok:-(
DT_2
11-Oct-14 8:06am
View
Nope:-(
DT_2
11-Oct-14 8:05am
View
Sir, i mentioned it in earlier reply. But it is not the issue.
DT_2
11-Oct-14 6:58am
View
I am not getting the stateData values on View, but getting on controller when I am debugging the code.
DT_2
11-Oct-14 6:41am
View
In Home Controller, in LoadStatesByCountryID Action method, from where I am returning the Json object.
DT_2
11-Oct-14 6:29am
View
No sir, I don`t know how to use console tab? Sorry:-(
DT_2
11-Oct-14 3:22am
View
yes it is itemData. and its not
statesData
, it is
stateData
. But didn`t get solution,state list is empty.
DT_2
11-Oct-14 2:24am
View
Yes getting the values in stateData.
DT_2
24-Jul-14 2:03am
View
Sorry Sir, my requirement has been changed and I was not informed.Apologies.
or you want to select the organization and then the department will fill then selection on the Department the Grade should be coming in the dropdown. (if this is the requirement then your action method are quite correct)
This i want. But getting error in view section.
DT_2
22-Jul-14 13:43pm
View
Sir Ranjeet,
Here is my code for controller class:-
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
namespace OrganisationDemo.Controllers
{
public class HomeController : Controller
{
Entity _entities = new Entity();
public ActionResult Index()
{
ViewBag.OrganisationList = new SelectList(_entities.Organisations.ToList(), "OrganisationID", "OrganisationName").FirstOrDefault();
return View();
}
public JsonResult GetDepartment(int organisaionId)
{
var department = (from dept in _entities.Departments
where dept.DepartmentID == organisaionId
select dept.DepartmentName).ToList();
return Json(new SelectList(department.ToArray(), "DepartmentID", "DepartmentName"), JsonRequestBehavior.AllowGet);
}
public JsonResult GetGrade(int departmentID)
{
var gradeList = (from grade in _entities.Grades
where grade.DepartmentID == departmentID
select grade.GradeName).ToList();
return Json(new SelectList(gradeList.ToArray(), "GardeID", "GradeName"), JsonRequestBehavior.AllowGet);
}
public ActionResult About()
{
ViewBag.Message = "Your app description page.";
return View();
}
public ActionResult Contact()
{
ViewBag.Message = "Your contact page.";
return View();
}
}
}
--------------------------------------------------------------------------------\
And here is my view code:-
@model OrganisationDemo.Entity
@{
ViewBag.Title = "Home Page";
}
@using (Html.BeginForm("Index", "Home", FormMethod.Post))
{
<div>Select Organisation : </div>
@Html.DropDownList("organisation", new SelectList(ViewBag.OrganisationList), new { id = "drporganisation"})
<br />
<select id="txtdepartment" name="department"></select>
<br />
<select id="txtgrade" name="grade"></select>
<br />
}
@section scripts
{
<script type="text/javascript">
$(document).ready(function () {
$("#txtdepartment #txtgrade").prop("disabled", true);
$("#drporganisation").change(function () {
var options = {};
options.url = "home/getdepartment";
options.type = "POST";
option.data = JSON.stringify({ organisaionId: $("#drporganisation").val() });
options.datatype = "json";
options.contentType = "application/json";
options.success = function (department) {
$("#txtdepartment").empty();
for (var i = 0; i < department.length; i++)
$("#txtdepartment").append("<option>" + department[i] + "</options>");
}
$("#department").prop("disabled", false);
$.ajax(options);
});
});
</script>
}
--------------------------------------------------------------
What could be the wrong with my code?I am unable to retrieve the any of the drop down.
Please help me.
DT_2
21-Jul-14 7:42am
View
can you just give me the code snippet that i want exaclty? Because I am unable to catch the third drop down list at the same time of second list.
DT_2
15-Jul-14 6:50am
View
No Raje thats not my questions answer. I dont want role based.
Like if u r logged in, in your mobile phone on FB or Gmail, you dont loggedout, you just keep it off when again you want to start gmail you donot have to enter id and password.
That I want.
DT_2
10-Jul-14 6:12am
View
If I want to give path of excel sheet from an string object in connection string(Data Source), how can I do that:
("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=d:\\csharp.net-informations.xlsx;Extended Properties=Excel 12.0 Xml;");
I do that like this :
string path = "d:\\csharp.net-informations.xlsx"
("Provider=Microsoft.ACE.OLEDB.12.0;Data Source="+path.ToString()+";Extended Properties=Excel 12.0 Xml;");
But this is giving me error.
DT_2
10-Jul-14 3:51am
View
Mr. Dang, I have to market and give the demo to client, and also have to give them a demo version of my application, so how can i use your way?
DT_2
28-Jun-14 6:32am
View
I didnt get it?
Are you getting my point what i want?how to use my office network on different different location(pune, mumbai, nashik?)?
Mr. Pravuprasad I want to store database into my application only.
DT_2
28-Jun-14 4:27am
View
So you meant to say that If I want to install my application on only one PC, I have to change code for SQLite or Access or SqlCE now?
DT_2
10-May-14 1:27am
View
No, Nope!!! Not solved. any other solution for DropDownList instead using the ViewBag object?
DT_2
9-May-14 8:28am
View
Tired!!! Sankarsan Sir, not get the solution why it is going to the
else
section.
DT_2
9-May-14 8:13am
View
In DropDownList() we can`t write the lambda expression. I converted it to DropDownlistFor(). And not getting the list of Employee Type.
DT_2
9-May-14 7:56am
View
Sankarsan tried a lot and not reached at the solution. I think my ViewBag statement in
controller
is wrong. Can you tell me how to write LINQ statement instead of my linq statement?
DT_2
9-May-14 7:04am
View
Ok I will try and get back to you Sir Ji:-)
DT_2
9-May-14 6:56am
View
Greate, blank List is there. But what about my values, it means it is checking the if condition. I have the values in my table. so how can I check or correct or solve it?
DT_2
9-May-14 6:52am
View
Sakarsan It is not checking that
if
condition.
DT_2
9-May-14 6:40am
View
Yes Sankarsan your solution didn`t gave me the exception, now I am rendering successful to that view, but the drop down list is not there, means that space of DropDown List Box is empty. nothing is there. No text box No dropdown list.
DT_2
28-Apr-14 6:12am
View
Abhinav, I am new on MVC, and all the above link I know. that is not the solution. How can I directly do that with ViewBag?
In my BillingTypeController.cs I write following
ViewBag.Names = _entities.BillingHeads.OrderBy(b => b.Name).ToList();
How Can I retreive data from above in View?
Show More