So basically the user can search for an object. If there are more than one object in the database then it should open a (popup? dialog?) where the user will select one of the found objects and then click on a button. How would I do this in web?
I haven't worked that much in web development.
Thanks in advice!

Amit MohantyRank #112 · 20K reputationPosted Jul 3, 2024, 6:05 AM EDT
To create a dialog-like experience similar to WinForms in a web application using ASP.NET, you can use a modal dialog (popup) to display search results and allow users to select an object.
Example: ASPX
Code-Behind:
protected void btnSearch_Click(object sender, EventArgs e) { List searchResults = new List { new { ObjectId = 1, ObjectName = "Object 1" }, new { ObjectId = 2, ObjectName = "Object 2" }, new { ObjectId = 3, ObjectName = "Object 3" } }; rptObjects.DataSource = searchResults; rptObjects.DataBind(); // Show the modal dialog string script = "window.onload = function() { showObjectModal(); };"; ClientScript.RegisterStartupScript(this.GetType(), "ShowModal", script, true); } protected void btnSelect_Click(object sender, EventArgs e) { // Handle selection here, e.g., retrieve selected object details string selectedObject1 = selectedObjectId.Value; // Perform further actions with selectedObject }Nikunj SatasiyaRank #302 · 8.3K reputationPosted Jul 3, 2024, 8:16 AM EDT
Try this solution: https://www.codingvila.com/2024/07/creating-dialog-for-object-selection.html