![]() |
| |||||||
![]() | « Previous Thread | Next Thread » |
| | LinkBack | Thread Tools | Display Modes |
| Sponsored Links |
| ||||
| How are you setting the value of hdn_phaseref? Is the postback having an effect on its value? I haven't yet needed this control, so have no experience with it.
__________________ jmurrayhead Did I help you out? Make me popular by clicking the icon!If you found a post helpful, please click the button in the lower right-hand corner of the post.Powered by ASP.Net |
| ||||
| I've tried setting it as <%#Eval("phaseref")%> and hdn_phaseref.value = When I look at the source of the page, the value shows in the hidden field. I also have a literal control in the header template of the Accordion control and I am able to retrieve the text contained in the literal using item.FindControl("ltl_accord_phase") If I change FindControl("hdn_phaseref") to FindControl("jfhfv") I get an object not set to instance error, so it's obviously finding the control, but for some reason it's empty. I think it must be somehow linked to the HeaderTemplate, but I'm not sure how yet. |
| ||||
| Try gaining access to the control as explained in this link: AJAX Control Library Accordion Problems - Brian Mains Blog |
| ||||
| I'm not quite sure how that would work because I'm binding the accordion to a datasource, so I can't call the control using the accordionID.FindControl as there are several instances of the same control and I don't explicitly define the accordion panes, so I can't call ths control using the ID of the pane either. This seems very strange. |
| ||||
| OK. I seem to have got somewhere, but no idea if it's anywhere useful!! ![]() I only seem to be able to get a value(text) from a literal control. All other types of control come back blank....Hmmmm.... Anyone heard of this before? |
| ||||
| I have found a solution of sorts....Not ideal, but it may have to do for the time being. I have had to add an update button to the ContentTemplate of the accordion so each pane has it's own update button. Then I added a CommandName and Argument to the update button:- Code: <asp:ImageButton id="img_update" runat="server" ImageURL="link_update.gif" CommandName="Update" CommandArgument='<%#Eval("phaseref")%>' />
Code: <ajaxtoolkit:accordion id="accord_phase" runat="server" ....... OnItemCommand="update_phase"> Code: Sub update_phase(ByVal s As Object, ByVal e As CommandEventArgs)
If e.CommandName = "Update" then
Dim accord As AjaxControlToolkit.Accordion = s
Dim accord_pane As AjaxControlToolkit.AccordionPane = accord.Panes(accord.SelectedIndex)
Dim phaseref As Integer = e.CommandArgument
Dim chk_initial As Checkbox = accord_pane.FindControl("chk_initial")
End If
![]() |
![]() |
|
| Bookmarks |
| Tags |
| accordion, ajax, control, postback |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Webchart Control not displaying in Firefox | richyrich | .Net Development | 1 | June 2nd, 2008 01:43 PM |
| WebCharts Control | richyrich | .Net Development | 1 | April 4th, 2008 11:14 AM |
| Dynamic Content in AJAX Extender | richyrich | .Net Development | 3 | March 17th, 2008 12:14 PM |
| Custom Calendar Control | AOG123 | Microsoft Access | 1 | March 16th, 2008 02:06 PM |
| Sponsored Links |
| ASP.NET Resource Index a directory of ASP.NET tutorials, applications, scripts, assemblies and articles for the novice to professional developer. Free Web Directory Including Chats and Forums Resources, Offer automatic, instant and free directory submissions. | URLZ Web Directory URLZ Web Directory Free Web Directory - Add Your Link The Little Web Directory | Free Web Directory Pegasus free web directory is a free directory organised by categories. Web Directory & SEO Services dirroot web directory |