Click here to Skip to main content
15,845,436 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: ASP.NET web api tutorial Pin
Afzaal Ahmad Zeeshan26-Jun-19 0:50
professionalAfzaal Ahmad Zeeshan26-Jun-19 0:50 
QuestionWeb Application and API Pin
Mycroft Holmes12-Jun-19 20:42
professionalMycroft Holmes12-Jun-19 20:42 
AnswerRe: Web Application and API Pin
Richard Deeming13-Jun-19 0:15
mveRichard Deeming13-Jun-19 0:15 
GeneralRe: Web Application and API Pin
Mycroft Holmes13-Jun-19 13:36
professionalMycroft Holmes13-Jun-19 13:36 
QuestionFinalize() vs Dispose() Pin
Anandkumar Prajapati11-Jun-19 19:35
professionalAnandkumar Prajapati11-Jun-19 19:35 
AnswerRe: Finalize() vs Dispose() Pin
Mycroft Holmes11-Jun-19 21:01
professionalMycroft Holmes11-Jun-19 21:01 
AnswerRe: Finalize() vs Dispose() Pin
Shraddha_Patel12-Nov-19 18:23
Shraddha_Patel12-Nov-19 18:23 
QuestionI want to update users table according to ıd value Pin
Member 1064949510-Jun-19 12:38
Member 1064949510-Jun-19 12:38 
Hi ,

I can do listing users account ,just want to change their passwords,
So ,I want to update users table according to ıd value like below

HTML
<table id="myTable" class="table table-striped table-bordered table-condensed">
           <thead>
               <tr>
                   <th style="width: 2px">Id</th>                  
                   <th>Name And Surname</th>
                   <th>Passwords</th>
                   <th></th>
               </tr>
           </thead>
           <tbody>
               @foreach (var veri in Model)
               {
               <tr>
                   <td>@veri.Id</td>                  
                   <td>@veri.UserName</td>
                   <td>@Html.TextBoxFor(t => new AccountInfo().Pwd, new { @Value = @veri.Pwd, @class = "form-control", style = "width:100px"})
                   <td>               
                @Html.ActionLink(linkText: "UPDATE", actionName: "UpdateManageUser", controllerName: "AdminPanel", routeValues: new {id = @veri.Id, NewPwd = @veri.NewPwd },
            htmlAttributes: new {onclick= "userUpdateJson()", id = "btnUpdate",@class = "btn btn-primary pull-left"})
               </td>
               </tr>
               }
           </tbody>
       </table>
         
         public ActionResult UpdateManageUser(int id,string pwd)
       {
           var con = Core.GetLocalConnection();
           con.Open();
  
           var cmd = new SqlCommand("SELECT COUNT(*) FROM S_ACCOUNTINFO WHERE ID=@P1", con);
           cmd.Parameters.AddWithValue("@P1", id);
           var result= Convert.ToInt32(cmd.ExecuteScalar());
           if result= == 1)
           {
               cmd = new SqlCommand("UPDATE S_ACCOUNTINFO SET PWD=@P2 WHERE ID=@P1", con);
               cmd.Parameters.AddWithValue("@P1", id);
               cmd.Parameters.AddWithValue("@P2", pwd);
               cmd.ExecuteNonQuery();
           }
           con.Close();        
  
           return RedirectToAction("ManageUser");
             
       }

SuggestionRe: I want to update users table according to ıd value Pin
Richard Deeming11-Jun-19 2:16
mveRichard Deeming11-Jun-19 2:16 
QuestionHow to use treeView to save the directory tree into the SQL Server database ? Pin
Member 24584679-Jun-19 17:27
Member 24584679-Jun-19 17:27 
AnswerRe: How to use treeView to save the directory tree into the SQL Server database ? Pin
Richard MacCutchan9-Jun-19 22:49
mveRichard MacCutchan9-Jun-19 22:49 
QuestionMysterious ADFS problem Pin
Super Lloyd5-Jun-19 22:19
Super Lloyd5-Jun-19 22:19 
Questionweb form needs to be used for several languages Pin
dcof2-Jun-19 20:46
dcof2-Jun-19 20:46 
AnswerRe: web form needs to be used for several languages Pin
F-ES Sitecore3-Jun-19 2:00
professionalF-ES Sitecore3-Jun-19 2:00 
Question(SOLVED) Is it possible to raise an error on filename that resides on the server? Pin
samflex29-May-19 5:36
samflex29-May-19 5:36 
AnswerRe: Is it possible to raise an error on filename that resides on the server? Pin
Richard Deeming29-May-19 8:16
mveRichard Deeming29-May-19 8:16 
GeneralRe: Is it possible to raise an error on filename that resides on the server? Pin
samflex29-May-19 10:18
samflex29-May-19 10:18 
GeneralRe: Is it possible to raise an error on filename that resides on the server? Pin
Richard Deeming30-May-19 1:16
mveRichard Deeming30-May-19 1:16 
GeneralRe: Is it possible to raise an error on filename that resides on the server? Pin
samflex30-May-19 5:00
samflex30-May-19 5:00 
GeneralRe: Is it possible to raise an error on filename that resides on the server? Pin
Richard Deeming30-May-19 8:31
mveRichard Deeming30-May-19 8:31 
GeneralRe: Is it possible to raise an error on filename that resides on the server? Pin
samflex31-May-19 4:17
samflex31-May-19 4:17 
GeneralRe: Is it possible to raise an error on filename that resides on the server? Pin
Richard Deeming31-May-19 4:26
mveRichard Deeming31-May-19 4:26 
GeneralRe: Is it possible to raise an error on filename that resides on the server? Pin
samflex31-May-19 4:42
samflex31-May-19 4:42 
GeneralRe: Is it possible to raise an error on filename that resides on the server? Pin
Richard Deeming31-May-19 4:50
mveRichard Deeming31-May-19 4:50 
GeneralRe: Is it possible to raise an error on filename that resides on the server? Pin
samflex31-May-19 5:19
samflex31-May-19 5:19 

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.