Click here to Skip to main content
15,890,438 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Failed to resolve include text for file:C:\Users\XXXXX\Desktop\Angular2Apps\BSCSecurityAddressBookWeb\BSCSecurityAddressBookWeb\Scripts\Manager.ttinclude Pin
ZurdoDev17-Mar-17 2:05
professionalZurdoDev17-Mar-17 2:05 
GeneralRe: Failed to resolve include text for file:C:\Users\XXXXX\Desktop\Angular2Apps\BSCSecurityAddressBookWeb\BSCSecurityAddressBookWeb\Scripts\Manager.ttinclude Pin
indian14320-Mar-17 13:28
indian14320-Mar-17 13:28 
QuestionUsing a MVC attribute to confirm identity, rediect to signin, then to original destination Pin
jkirkerx16-Mar-17 9:31
professionaljkirkerx16-Mar-17 9:31 
AnswerGot this to work, not sure if it's kosher Pin
jkirkerx16-Mar-17 11:11
professionaljkirkerx16-Mar-17 11:11 
QuestionHow to read Excel data and insert into the access database using Microsoft.Office.Inteop.Excel in asp.net using CSharp language Pin
Member 1306265215-Mar-17 22:53
Member 1306265215-Mar-17 22:53 
AnswerRe: How to read Excel data and insert into the access database using Microsoft.Office.Inteop.Excel in asp.net using CSharp language Pin
F-ES Sitecore15-Mar-17 23:16
professionalF-ES Sitecore15-Mar-17 23:16 
AnswerRe: How to read Excel data and insert into the access database using Microsoft.Office.Inteop.Excel in asp.net using CSharp language Pin
Richard MacCutchan16-Mar-17 0:36
mveRichard MacCutchan16-Mar-17 0:36 
QuestionHow can I refresh partial view in ASP.NET MVC 5? Pin
Member 1299209415-Mar-17 6:38
Member 1299209415-Mar-17 6:38 
I know that there are many answers on google, I tried many but nothing worked! I have a CodeMirror text editor and a list of files.I want to display the contents of a file when click on it.This is my first time using Javasctipt so I can't figure out what's wrong with my code.


This is the code I wrote so far:

controller:
C#
public ActionResult Index()
        {
            StudentsCodes model = new StudentsCodes();
            model.Student = (Student)CurrentUser;
            var user = UserManager.FindById(((Student)CurrentUser).InstructorID);
            model.Instructor =(Instructor) user;
            return View(model);
        }
public PartialViewResult DevelopmentPartial (StudentsCodes path )
        {
            return PartialView(path);
        }


Main view:

HTML
<script type="text/javascript" src="~/Scripts/jquery.unobtrusive-ajax.js"></script>
    <script type="text/javascript" src="~/Scripts/jquery-3.1.1.js"></script>
	
	<ul id="tree">
        @foreach (var file in Directory.GetFiles(Server.MapPath("~/Content/" + Model.Student.UserName + "/CompilerProject/" + name)))
            {
                var filename = Path.GetFileName(file);
                <li id="filelist" onclick="@(Model.path = "~/Content/" + Model.Student.UserName + "/CompilerProject/src/" + @filename)">
                    
                    @filename
                /li>
                }
    
    <div id="partial">
        @{
            Html.RenderPartial("DevelopmentPartial",null);
        }

    </div>
	<script>
        $(document).ready(function () {
            $("#filelist").click(function (e) {
               @{Html.RenderAction("DevelopmentPartial", Model);
               }
            });
        });
    </script>


PartialView:

HTML
@using (Html.BeginForm())
        {
            var fileContents= "";
            if (Model==null)
            {
                fileContents = "";
            }
            else
            {
                fileContents = System.IO.File.ReadAllText(Server.MapPath(Model.path));
            }
                @Html.TextArea("code", fileContents, new { id = "code" })
        }


The result was a non-clickable list elements , 3 text editors overlap each other, and display only the contents of the last file in the list. What am I doing wrong?
AnswerRe: How can I refresh partial view in ASP.NET MVC 5? Pin
bVagadishnu16-Mar-17 7:28
bVagadishnu16-Mar-17 7:28 
GeneralRe: How can I refresh partial view in ASP.NET MVC 5? Pin
Member 1299209416-Mar-17 9:40
Member 1299209416-Mar-17 9:40 
GeneralRe: How can I refresh partial view in ASP.NET MVC 5? Pin
bVagadishnu17-Mar-17 8:24
bVagadishnu17-Mar-17 8:24 
GeneralRe: How can I refresh partial view in ASP.NET MVC 5? Pin
Member 1299209417-Mar-17 9:17
Member 1299209417-Mar-17 9:17 
QuestionWhat manual do i need. Pin
xiecsuk15-Mar-17 1:22
xiecsuk15-Mar-17 1:22 
AnswerRe: What manual do i need. Pin
Richard MacCutchan15-Mar-17 3:10
mveRichard MacCutchan15-Mar-17 3:10 
AnswerRe: What manual do i need. Pin
ZurdoDev15-Mar-17 8:30
professionalZurdoDev15-Mar-17 8:30 
AnswerRe: What manual do i need. Pin
Richard Deeming15-Mar-17 9:00
mveRichard Deeming15-Mar-17 9:00 
GeneralRe: What manual do i need. Pin
xiecsuk16-Mar-17 6:07
xiecsuk16-Mar-17 6:07 
GeneralRe: What manual do i need. Pin
Richard Deeming16-Mar-17 6:49
mveRichard Deeming16-Mar-17 6:49 
GeneralRe: What manual do i need. Pin
xiecsuk17-Mar-17 0:07
xiecsuk17-Mar-17 0:07 
Questionacquire data from a website Pin
Member 1306012114-Mar-17 23:17
Member 1306012114-Mar-17 23:17 
QuestionRe: acquire data from a website Pin
ZurdoDev15-Mar-17 1:16
professionalZurdoDev15-Mar-17 1:16 
QuestionOpen template word doc and replace values Pin
byka14-Mar-17 5:34
byka14-Mar-17 5:34 
SuggestionRe: Open template word doc and replace values Pin
CHill6014-Mar-17 5:43
mveCHill6014-Mar-17 5:43 
AnswerRe: Open template word doc and replace values Pin
Richard Deeming14-Mar-17 6:54
mveRichard Deeming14-Mar-17 6:54 
GeneralRe: Open template word doc and replace values Pin
byka14-Mar-17 8:09
byka14-Mar-17 8:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.