ASP.NET : manage and edit users made with "website administration tool"
I have a ASP.NET website that is coded with c# I use Login controls. Now I can Create user & change password with built-in controls. but there is no way to manage and edit users. the only way is "ASP.NET website administration tool" , but there is no control like this tool so we can manage users inside the app.
who can help me? for example is there any code to manage(update) database?
See also questions close to this topic
-
How to sync picture from Azure Storage Container to UWP app?
I have already created the azure storage container and succeed in uploading pictures from UWP to azure storage container. I want to know how to download or sync picture which stored in container to my UWP application so that I can do a photo gallery.
-
How can i set the same resolution for mobile and window screen using unity?
I have developed a unity project, that work perfectly on mobile screen with resolution (Width: 768 Height: 1024 ). I want to run same project on window with same resolution. How can I do this.Links of the screens are.. Mobile screen snap here and window screen snap here
Thank you in advance.
-
tower of hanoi using data structure
can you help me with a tower of hanoi using stack in c sharp ☻☻
using System; using System.Collections.Generic; using System.Text; namespace Tower { class Program { static int movecount = 0; static public void Solve2DiscsTOH(Stack<int> source, Stack<int> temp, Stack<int> dest) { temp.Push(source.Pop()); movecount++; PrintStacks(); dest.Push(source.Pop()); movecount++; PrintStacks(); dest.Push(temp.Pop()); movecount++; PrintStacks(); } static public bool SolveTOH(int nDiscs, Stack<int> source, Stack<int> temp, Stack<int> dest) { if (nDiscs <= 4) { if ((nDiscs % 2) == 0) { Solve2DiscsTOH(source, temp, dest); nDiscs = nDiscs - 1; if (nDiscs == 1) return true; temp.Push(source.Pop()); movecount++; PrintStacks(); //new source is dest, new temp is source, new dest is temp; Solve2DiscsTOH(dest, source, temp); dest.Push(source.Pop()); movecount++; PrintStacks(); //new source is temp, new temp is source, new dest is dest; SolveTOH(nDiscs, temp, source, dest); } else { if (nDiscs == 1) return false; Solve2DiscsTOH(source, dest, temp); nDiscs = nDiscs - 1; dest.Push(source.Pop()); movecount++; PrintStacks(); Solve2DiscsTOH(temp, source, dest); } return true; } else if (nDiscs >= 5) { SolveTOH(nDiscs - 2, source, temp, dest); temp.Push(source.Pop()); movecount++; PrintStacks(); SolveTOH(nDiscs - 2, dest, source, temp); dest.Push(source.Pop()); movecount++; PrintStacks(); SolveTOH(nDiscs - 1, temp, source, dest); } return true; } static public Stack<int> A = new Stack<int>(); static public Stack<int> B = new Stack<int>(); static public Stack<int> C = new Stack<int>(); static public void PrintStacks() { if (countA != A.Count || countB != B.Count || countC != C.Count) { int diffA = A.Count - countA; int diffB = B.Count - countB; int diffC = C.Count - countC; if (diffA == 1) { if (diffB == -1) Console.Write("Move Disc " + A.Peek() + " From B To A"); else Console.Write("Move Disc " + A.Peek() + " From C To A"); } else if (diffB == 1) { if (diffA == -1) Console.Write("Move Disc " + B.Peek() + " From A To B"); else Console.Write("Move Disc " + B.Peek() + " From C To B"); } else //if (diffC == 1) { if (diffA == -1) Console.Write("Move Disc " + C.Peek() + " From A To C"); else Console.Write("Move Disc " + C.Peek() + " From B To C"); } countA = A.Count; countB = B.Count; countC = C.Count; Console.WriteLine(); } PrintStack(A); Console.Write(" , "); PrintStack(B); Console.Write(" , "); PrintStack(C); Console.Write(" , "); } static int countA = 0; static int countB = 0; static int countC = 0; static public void PrintStack(Stack<int> s) { Stack<int>.Enumerator et = s.GetEnumerator(); Console.Write("["); string str = ""; while (true) { if (et.MoveNext() == false) break; str += et.Current.ToString(); } for (int i = str.Length - 1; i >= 0; i--) Console.Write(str[i]); Console.Write("]"); } static void Main(string[] args) { while (true) { Console.Write("\nEnter the number of discs (-1 to exit): "); string s = C
i was tried this but i want thing more simple
-
IIS web sites does not reflect the change on each other
I have 3 asp.net solutions which makes one application. These solution hosted on 3 IIS web site site and redirection happens among them as required. after login(1st website) , an update to DB(from second website) does not reflect on a web page on 3rd web site.
I understand it is because application hosted on 3 different web sites and the dlls from other web sites does not get refreshed. To solve this problem,presently i am logging out and loggin in..so all the websites get refreshed during login.
But i dont want re-login. how to update other 2 website dlls after the update to DB?
-
Session issue after upgradation to 64bit
Recently we have migrated web application from 32bit to 64bit. But now there is weird behavior in session values, as session picking old values on invoking response.redirect method.
For example:
On drop-down event change we set the below value of session in page1.aspx Session ("type")= "IN". When we redirected to page2.aspx and Now the value of session ("type") is nothing.
Then on next time again if we tried to set value of session ("type") ="OUT" in page1.aspx on drop-down change event & redirect to page2.aspx second the value of session ("type") is "IN"
This only happening after web application migrated from 32bit to 64bit , as before in 32bit it was working fine. And also this issue is only on production server but not in Test server nor on Quality server.
Need help.
-
asp.net core for loop does not render value for fields?
I am working on a database project and I needed a checkbox list for the create method. Model:
public class LabAppointmentCreationModel { public string PatientName{get;set;} public string PatientsPhoneNumber {get;set;} public DateTime AppointMentDateTime{get;set;} public List<TestNeeded_CheckBoxListItem> TestsNeeded {get;set;} } public class TestNeeded_CheckBoxListItem { public int Id{get;set;} public string TestName {get;set;} public bool IsChecked {get;set;} }
In controller I returned the model with available tests.
public async Task<IActionResult> Index() { var tests=await _context.Tests.ToListAsync(); var testItems=new List<TestNeeded_CheckBoxListItem>(); foreach (var test in tests) { testItems.Add(new TestNeeded_CheckBoxListItem{Id=test.Id,TestName=test.Name,IsChecked=false}); } var model=new LabAppointmentCreationModel(){TestsNeeded=testItems}; return View(model); }
Now in index page I displayed the appointments using jquery datatables. And for adding appointment I created a form within a bootstrap modal. In form I added the foreach loop for displaying the tests in the form of checkbox list.
<form asp-controller="Appointment" asp-action="Create" data-ajax="true" data-ajax-method="POST" data-ajax-mode="replace" data-ajax-success="onAddSuccess" data-ajax-failure="onFailed"> <div class="modal-body"> @Html.AntiForgeryToken() <div id="formBody"> <div class="category-title">Patient Details</div> <div class="row"> <div class="col-md-6"> <div class="form-group"> <label class="control-label" asp-for="PatientName">Name:</label> <input class="form-control" asp-for="PatientName" /> </div> <span asp-validation-for="PatientName" class="text-danger"></span> </div> <div class="col-md-6"> <div class="form-group"> <label class="control-label" asp-for="PatientsPhoneNumber">Phone Number:</label> <input class="form-control" type="tel" min="9" asp-for="PatientsPhoneNumber" /> </div> <span asp-validation-for="PatientsPhoneNumber" class="text-danger"></span> </div> </div> <div class="category-title">Available Tests</div> <div class="row"> <div class="col-md-12"> @foreach(var test in Model.TestsNeeded) { <div> <input type="hidden" asp-for="@test.Id"/> <label> <input type="checkbox" asp-for="@test.IsChecked"/> @unit.TestName </label> </div> } </div> </div> </div> </div> <div class="modal-footer"> <button type="submit" class="btn btn-success btn-fixed-width">Save</button> <button type="button" class="btn btn-default btn-fixed-width" data-dismiss="modal"> Close </button> </div> </form>
Ok now when I run the code it will work. It loads the index and displays checkbox and text needed everything.
But when I look at the source the input hidden fields doesn't have any values at all.
I tried with for loop and even tried adding value directly still it wont render the id to value. However when I displayed the id value in label (@test.Id) then it displays the correct id value for that test.
It seems I am getting values from the controller but in view its not rendering it.
I also followed this https://exceptionnotfound.net/simple-checkboxlist-in-asp-net-mvc/ yet nothing works.
I don't understand what I am missing here?
-
Username already exists, please check for available options during sign up
I am creating an angular app in which a user can register. But while registering I request him for some details like email, mobile number and all. Also, a username which he can choose. But here I want to do a check on the username as soon as he entered and display an error like," this username already exists in our database".
I have mysql database and front end with angular 4. I am new to this angular development, please help me how can i do this?
-
asp:Login doesn't caused event OnLoggingIn if another objekt caused postback before
I have on MasterPage:
<asp:Login ID="lgLogin" runat="server" OnLoggingIn="lgLogin_OnLoggingIn" />
and on normal page I have:
<asp:DropDownList runat="server" ID="ddl" AutoPostBack="true" />
If I do login action first, there is no problem. If I change DDL items, it causes postback. And after that, login does't work. It causes postback, but doesn't call lgLogin_OnLoggingIn method.
-
mysql - can I query how many connect_errors a given host gave?
MySQL has a policy to deny a host from reconnecting once it has reached configurable failed numbher of login attempts.
This can be set using
@@global.max_connect_errors
. See here: https://dev.mysql.com/doc/refman/5.7/en/blocked-host.htmlWhat I can't find and would be greatful if anybody can point me the way - is to ask the DB how many failed connection attempts has the DB experienced from a given host.
I'm working on a High-Availability setup between few nodes, and it's important for me to find this out - especially in our testing and integration environments.
Anybody?