Posts by Ryan Santos • 515 points
32 posts
-
1
votes1
answer230
viewsQ: Drag & Drop at any position in the div
How do I get the element that will be "dropped" to stay anywhere in my div? The way I’m doing it makes the elements align. Follow image and code so far: function allowDrop(ev) { ev.preventDefault();…
-
0
votes1
answer142
viewsQ: What is the correct way to run a web application in eclipse?
I am studying JSF using the eclipse IDE, but am finding a certain problem when running my application. When I run the application by clicking on the project itself, it doesn’t seem to load my…
-
1
votes1
answer18
viewsQ: Problems with if no managedbean
I have a login form with the registration and password fields. I am trying to validate this login where only the number "92018" can log in to the system, but when the login method is called, it does…
-
1
votes2
answers691
viewsQ: Limit the number of characters in a textbox
I am simulating an electronic urn in C#. To limit data entry, I decided to create a "keyboard" from 0 to 9, for the insertion of votes. However, I’m having trouble limiting the amount of characters…
-
1
votes1
answer4491
viewsQ: Safe update error using stored Procedure in MYSQL
I am having trouble updating my stock table using a stored Procedure in MYSQL. Follows the code: CREATE DEFINER=`root`@`localhost` PROCEDURE `atualiza_estoque`(id_produto int) BEGIN update estoque e…
-
0
votes1
answer649
viewsQ: Relationship 1:1
I’m having problems in the relationship of my tables products and stock. The stock table is responsible for storing the quantity of each item in the products table and the date when the product went…
-
0
votes0
answers436
viewsQ: Select with data from associative tables
I am creating a small database to store the books I own at home, but I came across the following situation: I have two associative tables, a call self-published, that allows the same book to have…
-
2
votes1
answer238
viewsQ: Remote validation preventing data editing
I am using remote validation to prevent repeated emails in the database, which works well, when I do some registration. The problem is that the remote does not accept the original registration…
-
2
votes1
answer1195
viewsQ: Hide Actionlink parameter
For example: /admin/Edit/1006 Is there any way to hide this id? So any malicious user can change the value and end up finding a user. I know you have to check the controller to see if the user can…
-
1
votes1
answer91
viewsQ: Display chosen Select value
I have this dropdownlist: <select> <option value="0">Selecione os capitulos</option> @foreach (var item in ViewBag.Capitulos) { <option…
-
1
votes1
answer4974
viewsQ: Implementation of ASP.NET MVC Shopping Cart
I am trying to set up a "simple" selling system, but I have no knowledge in e-commerce. What I want is the following: The user chooses the products he wants, assembles a cart, and finalizes the…
-
1
votes1
answer146
viewsQ: Filter search with Checkbox values
For example, the User typed the title of a publication, and marked the generous Action and Adventure, or the user did not type any title, but wants to see all publications that fit these genres. How…
-
2
votes1
answer130
viewsQ: Search with Checkbox
I am trying to create a search system in my application where the user can search the site publications according to gender. I can list the generos registered with checkbox, but I’m lost to do the…
-
0
votes1
answer259
viewsQ: Repeat div with foreach?
I have a list of registered users displays the most important data such as name and email. I created a div to display this data. However, I do not want to display everything in the same div, I would…
-
0
votes2
answers52
viewsQ: Prevent the user from voting in the same Post
I created a voting system, where users can give like/dislike in the chapters of books posted on the site. Follow my action: public ActionResult Like(int id) { int iduser =…
-
0
votes1
answer292
viewsQ: Select in two tables
Ban.cs public partial class Ban { public int IdBan { get; set; } public System.DateTime DataBan { get; set; } public System.DateTime DataDesban { get; set; } public int Usuario_IdUsuario { get; set;…
-
4
votes1
answer309
viewsQ: Lock or release a controller according to some condition
I have a controller that should only be accessed if an attribute in my table is "true". Is there any way at the time the user clicks on such a link, check if the attribute is true, and only then…
-
1
votes1
answer805
viewsQ: Popular Dropdownlist and make Insert with the chosen value
In my DB I have 3 tables: - Genero(IdGenero,Genero,Descricao) - Publicação(IdPublicacao, Titulo, Sinopse,IdUsuario) - PublicaçãoGenero(IdPublicacaoGenero,IdPublicacao,IdGenero) This last one makes…
-
0
votes0
answers167
viewsQ: Messaging System
I’m looking to implement some elements of communication between users of my application. I thought about creating something that would allow messaging, something like Facebook, but it doesn’t have…
asp.net-mvcasked Ryan Santos 515 -
3
votes1
answer1187
viewsQ: Get Login User Id
How do I get the logged in user id on the site, then insert it into another table? Trying to explain better. I have an action called Criapub, which allows the user to write their publications on the…
asp.net-mvcasked Ryan Santos 515 -
0
votes1
answer325
viewsQ: Invent Registration Confirmation Procedure
The idea is after making the registration, send the user an email containing a link, where he can actually confirm the registration and only release the permission to log in. Just to have a little…
-
0
votes2
answers179
viewsQ: Authorize has stopped working
Just follow my codes Login : public ActionResult Login(login login, string returnUrl) { if (ModelState.IsValid) { if (new AllFictionMembershipProvider().ValidateUser(login.email, login.senha)) {…
asp.net-mvcasked Ryan Santos 515 -
0
votes1
answer261
viewsQ: How to customize routes?
I have a controller called login and a view of the same name. When I access the login page, the URL is displayed this way: ~/Login/Login It is possible to customize this route, so that the link…
asp.net-mvcasked Ryan Santos 515 -
2
votes1
answer3092
viewsQ: How to create a login with different permission levels?
How to create a login with different permission levels? Is it necessary to create a table in the database to log in? I have read about formsauthentication, cookies and etc, but still do not…
-
0
votes1
answer127
viewsQ: Problem displaying image
As I display an image recorded in the database, I believe that it is not actually recorded, because I can only see the name/format of the image. In this case, how do I display this image? I looked…
-
2
votes1
answer566
viewsQ: Form with upload to image
How do I upload images to ASP.Net MVC? I have a registration form where the user has the option to send an image to use in his profile. An example would be useful.
-
0
votes0
answers36
viewsQ: Textbox with Autocomplete
I want to make a textbox show me the names of registered users in the bank while I type. Ex: if I type the letter r, the textbox should show me some options that contain the letter r, but, I’m not…
-
3
votes1
answer628
viewsQ: Combo box with search
I need to create a combobox that allows the administrator to search the user and that while the administrator searches, already appear within the combo some options that are similar to what was…
-
0
votes1
answer454
viewsQ: Is DAL class required for database connection?
Is it necessary to create a file for a database connection? According to a teacher of a colleague of mine it is necessary to have this DAL class to make the connection with the bank. But the book…
-
4
votes2
answers324
viewsQ: How to define a fixed value attribute in ASP.Net MVC?
I have a user class that has the attribute permissão, that should always be 1. Where and how would I fix this value? In the folder models, controller or in itself view criminal record?…
asp.net-mvcasked Ryan Santos 515 -
1
votes1
answer403
viewsQ: Two types of search in the same textbox
I wonder if it is possible to search two types of variables (one at a time) in a single textbox. Example: public ActionResult Index(string pesquisa) { var usuario = from u in db.usuario select u; if…
-
1
votes1
answer2030
viewsQ: Error adding Httppost to controller
I’m having a problem adding the attribute [HttpPost] on my controller. I mean, I can add the attribute without problems, but when I compile and go to the registration form I just can’t access. I get…