![]() |
| |||||||
![]() | « Previous Thread | Next Thread » |
| | LinkBack | Thread Tools | Display Modes |
| Sponsored Links |
| ||||
| So basically you want to pass the selected value from ProjectDDL to ZonesDataSource which will populate ZonesDDL. Is that about right? |
| ||||
| Try changing this:- Code: <SelectParameters>
<asp:Parameter Name="id" />
</SelectParameters>
Code: <SelectParameters>
<asp:ControlParameter Name="id" ControlID="ProjectDDL" />
</SelectParameters>
|
| ||||
| What actually happens when you try the change I posted? Do you get any errors? Does the DDL just not get populated? As far as I know that is the correct way to pass an id to datasource control. I don't use datasource controls so am guessing a little bit here. |
| ||||
| did a response.write on: Code: Public Shared Function Zones(ByVal pid As Integer)
strSQL = "SELECT "
strSQL = strSQL & "idkey, "
strSQL = strSQL & "project_id, "
strSQL = strSQL & "userID, "
strSQL = strSQL & "edited, "
strSQL = strSQL & "name, "
strSQL = strSQL & "description "
strSQL = strSQL & "FROM tblzones "
strSQL = strSQL & "WHERE idkey = " & pid & " "
strSQL = strSQL & "ORDER BY name ASC"
HttpContext.Current.Response.Write(strSQL)
Return strSQL
End Function
so how come my ZonesDDL is blank ![]() Shem |
| ||||
| My guess is an error in your GetList function. I add an error catching property to my BO classes to pass an errors to. Try using a catch ex as exception in the try in your GetList function to catch any error that it's generating. Should be something like Code: Try . . . Catch ex as Exception templist = New ZonesList templist.page_error = ex.tostring finally . . end try Something like templist.add(ex.tostring)</edit> <edit2>Actually, that wouldn't work either as the list would be expecting a Zones type, not a string...Hmmm...Tricky....Will have to have a think</edit2> I said this ages ago, but I do sometimes find .NET a bit like using Dreamweaver, in that it puts all the code together for you and if it doesn't work as you anticipate it's a devil's own job to work out why... Last edited by richyrich; June 30th, 2008 at 05:44 AM. |
| ||||
| ok it's getting values but as you can see below, the option name is blank? Code: <select name="ZonesDDL" onchange="javascript:setTimeout('__doPostBack(\'ZonesDDL\',\'\')', 0)" id="ZonesDDL">
<option value="4"></option>
<option value="5"></option>
<option value="6"></option>
</select>
@RR: what do you use if ya don't use datasource control? |
![]() |
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| populate combobox from another | Jaykappy | Microsoft Access | 4 | May 7th, 2008 02:56 PM |
| WebCharts Control | richyrich | .Net Development | 1 | April 4th, 2008 11:14 AM |
| 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 |