Posts

Showing posts with the label asp.net-mvc

query from multi table show in tableview

query from multi table show in tableview I Have 16 tables with difference columns and some common data. And I wanna to show these Common data in one Table in view. Now I use Entity Framework to query from these 16 tables and Use 16 Foreach to put theme in a Common List<Common_ViewModel> and after all send this List to my view : return view(List); List<Common_ViewModel> But My database is big and process take more time. what is the best Idea with multi table query and show common data of tables in one table in View ? Have you tried to create a view, with joins, then update your edmx to mapp the view and the use it, or use stored procedure – Mohammad Ali Jul 1 at 9:22 If you are using a SQL Sever it is probably quicker to use a stored procedure to create the view. – jdweng ...

ajax keypress function is not working and the ActionResult parameter is not receiving any value

ajax keypress function is not working and the ActionResult parameter is not receiving any value I want to change(calculate) a textboxs' value on ajax keypress event but the controller ActionResult is not receiving any value to calculate(receiving null) <script> $('#TotDiscnt').keypress(function () { //var data = $('#totDiscnt').val(); $.ajax({ type: 'Post', url: '/Whatever/Discount', data: $('#totDiscnt').val(), success: function (response) { $('#TotPurAmt').val(response); } }); }); </script> On controller public ActionResult Discount(string text) { // calculation return Json(sum, JsonRequestBehavior.AllowGet); I tried as data: { text: request.term }, while i do that the the ajax call is not calling the controller method.And one more thing how can i send two double value as a parameter t...

SSRS in Reporting (End-user can design report) and several Problems?

SSRS in Reporting (End-user can design report) and several Problems? For example: End-user(customer) can create new report or add/remove columns. I know that SSRS(SQL Server Reporting Service) can do this with "Report-Builder". The problem is Report-Builder need "ConnectionString" to operate. (I really don't want to share it for end-user). the second problem is End-user A can override any reports of End-user B with out permission. In my case, I have a Web app (MVC ASP.Net) and I want to give my customer can design their own reports by simple Interface. So, How do i do that ? if you suggest any solution, I'm kindly welcome and many thanks. By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Entity Framework & ASP.NET MVC: can't get to the [HttpPost] on my controller from another one

Entity Framework & ASP.NET MVC: can't get to the [HttpPost] on my controller from another one I'm trying to redirect the user from this view on the SolicitantesController to the one on the Create of ExpedientesController : SolicitantesController Create ExpedientesController @model Entrega02Programacion03.Models.Solicitante @{ ViewBag.Title = "InformeSolicitante"; } <h2>InformeSolicitante</h2> <div> <h4>Solicitante</h4> <hr /> <dl class="dl-horizontal"> <dd>Cedula: @ViewBag.Cedula </dd> <dd> Nombre: @ViewBag.Nombre</dd> <dd>Apellido: @ViewBag.Apellido</dd> <dd>Email: @ViewBag.Email</dd> <dd>Tel: @ViewBag.tel</dd> </dl> <div class="form-group"> <div class="col-md-offset-2 col-md-10"> <input type="submit" value="Crear Exp...

How can I preserve the url (with the querystring) after an Http Post but also add an error to the Model State?

How can I preserve the url (with the querystring) after an Http Post but also add an error to the Model State? Essentially want I'm trying to do is authenticate a user by having them enter their account and their social security number. If they enter an incorrect combination, I do the following on the Authenticate post action: Authenticate ModelState.AddModelError("Authenticated", authenticationError); return View(); This displays the error, but then I lose what was in my query string. An alternative to keep the query string is: ModelState.AddModelError("Authenticated", authenticationError); return Redirect(Request.Url + "?returnUrl=" + returnUrl); This will keep the query string, but the error will not display. I assume this is because the ModelState has changed. ModelState I need the returnUrl because the user is forced to the Authenticate page whenever they click to view a specific event. I want to set it up so that they still go to this eve...

What is the best way to connect multiple database with single nopCommerce project? [on hold]

What is the best way to connect multiple database with single nopCommerce project? [on hold] What is the best way to connect multiple database with single nopCommerce project. Like: Domain: google.com database: googledb Domain: yahoo.com database: yahoodb Based on domain request we want to reset db-context of nopCommerce. But we cant able to get current domain on that first request. Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.