Search

You searched for the word(s): userid:599671

Matching Posts

  • Capturing a Button Click Event from a Dynamically Added Control

    A colleague suggested that when an unhandled error occurs that in addition to logging the error, that I also pop-up a dialog box to the user, prompting them to record what they were doing when the error occurred. So in my ASP.Net 3.5 AJAX enabled web pages I'm trying to build a shared method which can be called from any web form. In a code filed called "Common.cs", which resides in the root of my project, I've constructed this method: public static void ShowErrorDialog(string msg
    Posted to Web Forms (Forum) by rmdw on 11/3/2009
  • Re: Capturing a Button Click Event from a Dynamically Added Control

    Peter, I very much appreciate you trying to help. However the downside of your solution is that I'd have to add all of that code to every web form that needs to call this common method. I want to find a solution where I can just call it and be done with it. Incidentally, the intention is that the text in the textbox will be sent to another method, which will store it in the database. Robert
    Posted to Web Forms (Forum) by rmdw on 11/3/2009
  • Re: Displaying a Dialog Box On-the-Fly

    Fayaz, In your example code, what is causing the Partial Postback to force the controls to appear? I don't see it anywhere. Robert
    Posted to ASP.NET AJAX UI (Forum) by rmdw on 10/31/2009
  • Re: Displaying a Dialog Box On-the-Fly

    Fayez, Wow, it worked! I didn't do it exactly as you did. Instead, I just added a PlaceHolder control and then issued this command: placeHolder.Controls.Add(panel); And it worked!!! Now I want to see if I can dynamically add a PlaceHolder on-the-fly. Robert
    Posted to ASP.NET AJAX UI (Forum) by rmdw on 10/31/2009
  • Displaying a Dialog Box On-the-Fly

    I want to create common code that will display a dialog box, prompting the user for feedback. Here's what I've created so far: <asp:UpdatePanel ID="UpdatePanel1" runat="server"> <ContentTemplate> <asp:Button ID="Button1" runat="server" Text="Button" OnClick="Button1_Click" /> </ContentTemplate> </asp:UpdatePanel> public static void ShowDialog(string msg) { Page page = HttpContext.Current.CurrentHandler
    Posted to ASP.NET AJAX UI (Forum) by rmdw on 10/30/2009
  • Can an ArrayList be converted into a SqlParameter Array?

    To date, in my DataObjects layer, when preparing a DataRow's contents to be passed to a Stored Procedure, I've prepared a SqlParameter array such as this: SqlParameter[] paramArray = new SqlParameter[] { new SqlParameter("@Equip_Des", row["Equip_Des"]), new SqlParameter("@Unit_No", row["Unit_No"]), new SqlParameter("@MIMS_No", row["MIMS_No"]), new SqlParameter("@Mine_Idx_R", row["Mine_Idx_R"]), new SqlParameter
  • Re: Can an ArrayList be converted into a SqlParameter Array?

    Rather than trying to convert anything, I ended up solving the problem another way. I just created an alternate version of my DoStoredProcedure method that accepts an ArrayList rather than a SqlParameter array. For those interested, here it is: public static int DoStoredProcedure(string timeout, string procName, ArrayList paramArrayList) { int retVal = 0; SqlConnection conn = ConnectionManager.GetConnection(); SqlCommand command = new SqlCommand(procName, conn); command.CommandType = CommandType
  • How to Introduce Transactions into Modular Code?

    I have a C# ASP.Net 3.5 application that utilizes SQL Server 2008 as the DB. All has been working fine so far but I now have a situation where I'd like to do the following: // First, clear existing DB table string sql = "DELETE FROM ContractRights2"; if (!DBTools.RunSQLNonQuery(sql)) throw new Exception("Failure to clear all records from 'ContractRights2'"); // Now update the empty table with a bunch of new data foreach (DataRow row in crData.Rows) { if (!DataObjects
  • Re: How to Introduce Transactions into Modular Code?

    I was not aware that one could pass an entire data table to SQL Server. I thought it was only one row at a time ... which I've done via a SqlParameter[] paramArray. Can you pass me a link or two outlining how I pass a data table to SQL Server and then deal with it therein? Robert
Page 1 of 88 (876 items) 1 2 3 4 5 Next > ... Last »