Member Avatar

Hello i'm working with data tables and model view controller and i want to display selected cells in another partial view For example this is my table with data: <table id="display1"> <tbody> <tr> <td><a href="#">0.34</a><td> <td><a href="#">0.35</a><td> </tr> </tbody> This is my script: $(document).ready(function(){ $('#display1 tbody').on('click', 'td', function () { $("#selectedOption").html($(this).val()); }); }); where selectedOption is a div inside a partial view. The problem is that it does not display the selected cell Please help me ,this is urgent

-1
11
Member Avatar

I tried to popup partial view, but its not working ,this is my link <a id="id1" href="@Url.Action("index", "versus", new { matchid = c.MatchID })" target="_blank" data-toggle="tooltip" data-placement="top" title="@homeMLName - @awayMLName"> @homeMLName - @awayMLName </a> And this is my script: <script> $('a#id1').click(function (event) { event.preventDefault(); window.open($(this).attr('href'), '_blank'); }); </script> It opens a new tab instead of a new window

Member Avatar
0
15
Member Avatar

XML File :http://goalserve.com/samples/soccer_inplay.xml Model: [XmlRoot(ElementName = "localteam")] public class Localteam { [XmlAttribute(AttributeName = "name")] public string Name { get; set; } [XmlAttribute(AttributeName = "goals")] public string Goals { get; set; } [XmlAttribute(AttributeName = "id")] public string Id { get; set; } } Controller: XmlDocument doc = new XmlDocument(); List<Localteam> s = new List<Localteam>(); doc.Load(Server.MapPath("soccer_inplay.xml")); foreach (XmlNode node in doc.SelectNodes("/scores/category/")) { s.Add(new Localteam { Name = node["Name"].InnerText }); } return View(s); View: <tr> <th>Name</th> <th>Goals</th> </tr> @foreach (WebApplication22.Models.Localteam s in Model) { <tr> <td>@s.Name</td> <td>@s.Goals</td> </tr> }

Member Avatar
0
12
Member Avatar

I wont to display other results according to one row: Country>>League HomeTeam AwayTeam Result **Italy>>Seria A** Juventus Inter [1-0] Inter Barcelona[2-0] **Albania>>Kategoria Superiore** Tirana-Kukes [2-1] What i have done till now displays this: **Italy>>Seria A** Juventus Inter [1-0] **Italy>>Seria A** Inter Barcelona[2-0] **Albania>>Kategoria Superiore** Tirana-Kukes [2-1] @foreach (var item in Model) { <tr> <td> @Html.DisplayFor(modelItem => item.Time) </td> <td> @Html.DisplayFor(modelItem => item.Country) </td> <td> @Html.DisplayFor(modelItem => item.League) </td> <td> @Html.DisplayFor(modelItem => item.Home) </td> <td> @Html.DisplayFor(modelItem => item.Away) </td> <td> @Html.ActionLink(item.Prediction, "IndexDetails", new { id = item.TeamId }) </td> <td> @Html.DisplayFor(modelItem => item.Odds) </td> <td> ?-? </td> </tr> } </table>

Member Avatar
0
26
Member Avatar

Server Error in '/' Application. Cannot open database "FDB" requested by the login. The login failed. Login failed for user 'fdb'. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Data.SqlClient.SqlException: Cannot open database "FDB" requested by the login. The login failed. Login failed for user 'fdb'. Source Error: Line 310: Debug.WriteLine(ex); Line 311: GC.Collect(); Line 312: throw; Line 313: } Line 314: } Source File: C:\Users\JT\Desktop\Data29\BetgunsProjects\FDBEngine\SqlHelper\SqlHelperStatic.cs Line: 312 Stack Trace: [SqlException (0x80131904): Cannot open database …

Member Avatar
0
19
Member Avatar

@model Stattips.Models.MatchesList <br /> <div class="col-sm-8 container-fluid"> <table class="table table-striped "> <tr rowspan="3"><ul class="breadcrumb"> <li><a href="#">Soccer</a></li> <li><a href="#">Albania</a></li> <li class="active">Kategoria Superiore</li> </ul></tr> <tr> <th>Matches</th> <th>Country</th> <th>Odds</th> </tr> @using (Html.BeginForm("AddMatches", "Matches")) { for (int i = 0; i < Model.Matches.Count(); i++) { <tr> <td> @Html.CheckBoxFor(m => Model.Matches[i].IsCheck) @Model.Matches[i].HomeTeam-@Model.Matches[i].AwayTeam @Html.HiddenFor(m => Model.Matches[i].HomeTeam) @Html.HiddenFor(m => Model.Matches[i].AwayTeam) </td> <td> @Model.Matches[i].Country @Html.HiddenFor(m => Model.Matches[i].Country) </td> <td> @Model.Matches[i].Odds @Html.HiddenFor(m => Model.Matches[i].Odds) </td> </tr> } <tr> <td> <input type="Submit" value="Add" name="button1" id ="button1" class="btn btn-primary" /> </td> </tr> } <tr> <td> <ul name="myselect" id="myselect"></ul> </td> </tr> </table> </div> <script> $('#button1').click(function(){ $('#myselect').empty(); $('checkbox.IsCheck').each(function () { var _row_data = …

Member Avatar
0
18
Member Avatar

Problem with my website [object Object]Internal Server Error Please Help me!

Member Avatar
0
14

The End.