Search Results

Search found 9 results on 1 pages for 'tnriverfish'.

Page 1/1 | 1 

  • Jquery .ajax async postback on C# UserControl

    - by tnriverfish
    I'm working on adding a todo list to a project system and would like to have the todo creation trigger a async postback to update the database. I'd really like to host this in a usercontrol so I can drop the todo list onto a project page, task page or stand alone todo list page. Here's what I have. User Control "TodoList.ascx" which lives in the Controls directory. The script that sits at the top of the UserControl. You can see where I started building jsonText to postback but when that didn't work I just tried posting back an empty data variable and removed the 'string[] items' variable from the AddTodo2 method. <script type="text/javascript"> $(document).ready(function() { // Add the page method call as an onclick handler for the div. $("#divAddButton").click(function() { var jsonText = JSON.stringify({ tdlId: 1, description: "test test test" }); //data: jsonText, $.ajax({ type: "POST", url: "TodoList.aspx/AddTodo2", data: "{}", contentType: "application/json; charset=utf-8", dataType: "json", success: function(msg) { alert('retrieved'); $("#divAddButton").text(msg.d); }, error: function() { alert("error"); } }); }); });</script> The rest of the code on the ascx. <div class="divTodoList"> <asp:PlaceHolder ID="phTodoListCreate" runat="server"> <div class="divTLDetail"> <div>Description</div> <div><asp:TextBox ID="txtDescription" runat="server"></asp:TextBox></div> <div>Active</div> <div><asp:CheckBox ID="cbActive" runat="server" /></div> <div>Access Level</div> <div><asp:DropDownList ID="ddlAccessLevel" runat="server"></asp:DropDownList></div> </div> </asp:PlaceHolder> <asp:PlaceHolder ID="phTodoListDisplayHeader" runat="server"> <div id="divTLHeader"> <asp:HyperLink ID="hlHeader" runat="server"></asp:HyperLink> </div> </asp:PlaceHolder> <asp:PlaceHolder ID="phTodoListItems" runat="server"> <div class="divTLItems> <asp:Literal ID="litItems" runat="server"></asp:Literal> </div> </asp:PlaceHolder> <asp:PlaceHolder ID="phAddTodo" runat="server"> <div class="divTLAddItem"> <div id="divAddButton">Add Todo</div> <div id="divAddText"><asp:TextBox ID="txtNewTodo" runat="server"></asp:TextBox></div> </div> </asp:PlaceHolder> <asp:Label ID="lbTodoListId" runat="server" style="display:none;"></asp:Label></div> To test the idea I created a /TodoList.aspx page that lives in the root directory. <uc1:TodoList runat="server" ID="tdl1" TodoListId="1" ></uc1:TodoList> The cs for the todolist.aspx protected void Page_Load(object sender, EventArgs e) { SecurityManager sm = new SecurityManager(); sm.MemberLevelAccessCheck(MemberLevelKey.AreaAdmin); } public static string AddTodo2() { return "yea!"; } My hope is that I can have a control that can be used to display multiple todo lists and create a brand new todo list as well. When I click on the #divAddButton I can watch it build the postback in firebug but once it completes it runs the error portion by alerting 'error'. I can't see why. I'd really rather have the response method live inside the user control as well. Since I'll be dropping it on several pages to keep from having to go put a method on each individual page. Any help would be appreciated.

    Read the article

  • C# GridView dynamically built columns with textboxes ontextchanged

    - by tnriverfish
    My page is a bulk order form that has many products and various size options. I've got a gridview that has a 3 static columns with labels. There are then some dynamically built columns. Each of the dynamically built columns have a textbox in them. The textbox is for quantity. Trying to either update the server with the quantity entered each time a textbox is changed (possibly ontextchanged event) or loop though each of the rows column by column and gather all the items that have a quantity and process those items and their quantities all at once (via button onclick). If I put the process that builds the GridView behind a if(!Page.IsPostBack) then the when a textchanged event fires the gridview only gets the static fields and the dynamic ones are gone. If I remove the if(!Page.IsPostBack) the process to gather and build the page is too heavy on processing and takes too long to render the page again. Some advice would be appreciated. Thanks

    Read the article

  • C# Wholesale Order form - textboxes in Gridviews in Repeater

    - by tnriverfish
    I'm building a wholesale order form on a website. The current plan is to... -get an ArrayList of DepartmentUnits -a DepartmentUnit has various attributes like "deptId", "description" and its own ArrayList of StoreItems -The StoreItems have attached ArrayList of various SizeOptions -The SizeOptions have an inventory count integer along with their description -Planning on putting an asp:Repeater on the page that has an asp:GridView in it -Each DepartmentUnit will have its own GridView -EachStore item will have a row in the GridView -Each SizeOption will have a TextBox in the row (approximately 10 options) -Each inventory count will be watermarked over the size option textbox The question becomes how will I then collect all this information correctly once the form has been filled out? I don't like the idea of putting all this information in an update panel and then posting back each time a GridView row or worse one of the row's textboxes changes. Any advice on putting a single save button on the page and looping through each Repeater item - and each GridViewRow - and each textbox - to get all the values entered? Better to try collecting all the items added in a single table at the bottom of the page and updating the string with jquery each time a text box is modified? Then just looping through the new table when saved? Not sure I know how to loop through that table though - updating if quantity is changed might be a bear too. If it considerably simplifies the process I could just remove the Repeater aspect and put separate GridViews on separate pages. Thanks!

    Read the article

  • SSRS Tablix Header Row Formatting

    - by tnriverfish
    I've got several reports and they have been built with various formatting. Nothing huge just the header row is different between them. I'd like to pick a standard and just update the reports so they all look the same. This can be done on a textbox by textbox basis - setting the font, font color, font size and background color. It seems like I should be able to select more than one textbox and set the formatting on them all at once but the "textbox properties" item is disabled when I've selected more than one. Any thoughts?

    Read the article

  • C# set custom UserControl variables when its in a Repeater

    - by tnriverfish
    <%@ Register Src="~/Controls/PressFileDownload.ascx" TagName="pfd" TagPrefix="uc1" %> <asp:Repeater id="Repeater1" runat="Server" OnItemDataBound="RPTLayer_OnItemDataBound"> <ItemTemplate> <asp:Label ID="LBLHeader" Runat="server" Visible="false"></asp:Label> <asp:Image ID="IMGThumb" Runat="server" Visible="false"></asp:Image> <asp:Label ID="LBLBody" Runat="server" class="layerBody"></asp:Label> <uc1:pfd ID="pfd1" runat="server" ShowContainerName="false" ParentContentTypeId="55" /> <asp:Literal ID="litLayerLinks" runat="server"></asp:Literal> </ItemTemplate> </asp:Repeater> System.Web.UI.WebControls.Label lbl; System.Web.UI.WebControls.Literal lit; System.Web.UI.WebControls.Image img; System.Web.UI.WebControls.HyperLink hl; System.Web.UI.UserControl uc; I need to set the ParentItemID variable for the uc1:pdf listed inside the repeater. I thought I should be able to find uc by looking in the e.Item and then setting it somehow. I think this is the part where I'm missing something. uc = (UserControl)e.Item.FindControl("pfd1"); if (uc != null) { uc.Attributes["ParentItemID"] = i.ItemID.ToString(); } Any thoughts would be appreciated.

    Read the article

  • Set Custom ASP.NET UserControl variables when its in a Repeater

    - by tnriverfish
    <%@ Register Src="~/Controls/PressFileDownload.ascx" TagName="pfd" TagPrefix="uc1" %> <asp:Repeater id="Repeater1" runat="Server" OnItemDataBound="RPTLayer_OnItemDataBound"> <ItemTemplate> <asp:Label ID="LBLHeader" Runat="server" Visible="false"></asp:Label> <asp:Image ID="IMGThumb" Runat="server" Visible="false"></asp:Image> <asp:Label ID="LBLBody" Runat="server" class="layerBody"></asp:Label> <uc1:pfd ID="pfd1" runat="server" ShowContainerName="false" ParentContentTypeId="55" /> <asp:Literal ID="litLayerLinks" runat="server"></asp:Literal> </ItemTemplate> </asp:Repeater> System.Web.UI.WebControls.Label lbl; System.Web.UI.WebControls.Literal lit; System.Web.UI.WebControls.Image img; System.Web.UI.WebControls.HyperLink hl; System.Web.UI.UserControl uc; I need to set the ParentItemID variable for the uc1:pdf listed inside the repeater. I thought I should be able to find uc by looking in the e.Item and then setting it somehow. I think this is the part where I'm missing something. uc = (UserControl)e.Item.FindControl("pfd1"); if (uc != null) { uc.Attributes["ParentItemID"] = i.ItemID.ToString(); } Any thoughts would be appreciated. Also tried this with similar results... when I debug inside my usercontrol (pfd1) the parameters I am trying to set have not been set. uc = (UserControl)e.Item.FindControl("pfd1"); if (uc != null) { uc.Attributes.Add("ContainerID", _cid.ToString()); uc.Attributes.Add("ParentItemId", i.ItemID.ToString()); }

    Read the article

  • C# GridView dynamically built columns with textboxes ontextchanged

    - by tnriverfish
    My page is a bulk order form that has many products and various size options. I've got a gridview that has a 3 static columns with labels. There are then some dynamically built columns. Each of the dynamically built columns have a textbox in them. The textbox is for quantity. Trying to either update the server with the quantity entered each time a textbox is changed (possibly ontextchanged event) or loop though each of the rows column by column and gather all the items that have a quantity and process those items and their quantities all at once (via button onclick). If I put the process that builds the GridView behind a if(!Page.IsPostBack) then the when a textchanged event fires the gridview only gets the static fields and the dynamic ones are gone. If I remove the if(!Page.IsPostBack) the process to gather and build the page is too heavy on processing and takes too long to render the page again. Some advice would be appreciated. Thanks

    Read the article

  • submitting data via email to websystem

    - by tnriverfish
    I'm working on a task system and I'd like to be able to submit a task to the system by emailing it to a particular address. I'm thinking I could set my user by the sender, the task subject by the subject and the task comments by the text of the email. Not sure the version of Exchange we have available if that matters but I'm running .net 3.5 and using C#. Any direction would be appreciated. Thanks, Charlie

    Read the article

  • Excel Macro to find text in cell and insert hyperlink on cell

    - by tnriverfish
    We're managing some system bugs in a web system and setting priority for execs in a spreadsheet. Each of the tickets has a "FD-" and four numbers as the ID. The web system has a hyperlink that has that "FD-####" at the end of the link. The end result would look like this -- http://www.mytickets.com/FD-#### I'd like to run a macro that finds all the FD-#### and inserts a hyperlink on each. There may be multiple FD-#### in a single cell and there will certainly be other text in there. I'd go through each and add the link but there are over 150 or so. Thanks!

    Read the article

1