Right click extender6/4/2023 We ALSO need somthing to pop up the "edit area". We need to create a "edit" area on this page. Using (SqlCommand cmdSQL = new SqlCommand(strSQL, conn)) Using (SqlConnection conn = new SqlConnection(4)) String strSQL = "SELECT * FROM tblHotelsA ORDER BY HotelName" That code is this: protected void Page_Load(object sender, EventArgs e) Ok, so now we need some code to load up the "table" (gridview). We go back to the above click event in a bit. Might not seem like somthing occured, but we now have a simple click event wrired up and code behind will have such a code stub. After you do that, your button will show a plain jane click event, like this: The instant you write "onclick=", (and hit the = button), then you get this in inteli-sense: ![]() While you can just drag + drop in the button from the toolbox, you can't double click on the button to create a click event, but you CAN in markup type in the onclick= Note how in above we just dropped in a plain jane asp.net button to "edit" the data. ![]() So, say we have this markup for hte table (a grid view). That "div" will be what we pop up to edit that one row of "details" in a form like display (as opposed as you note trying to edit data "in place" in a row of data which is a poor UI). ![]() ![]() Actually, you can most certainly pop up a dialog or some such to edit a given row.Īnd you can with ease drop in a plane jane button into that table, or in this case I suggest using a gridview, or even a listview (my favaorte).ĭrop in a control to display our "table" or data.
0 Comments
Leave a Reply. |