.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

How to use parameter from Dropdownlist to populate Rep. Table

Posted By:      Posted Date: September 02, 2010    Points: 0   Category :SharePoint
I successfully have populated a dropdownlist from a database. Now I need to create a sort of a Master/Detail situation - based on the selection in the DropDownlist, I need to populate a Repeating table. I just can't find any examples or tutorials on how to do this. I've tried stuff till my fingers were bleeding. Can someone help me figure this scenario out, please?

View Complete Post

More Related Resource Links

Help: populate Html.DropDownList from table data? [Linq to SQL model]


I have two tables, Users and Roles.  The roles table is a reference table for the different roles of my site (RoleId and RoleName columns). The Users table contains profile data for each user, including a RoleId column that is FK'd back to the Roles table [RoleId].

Both tables are in a Linq to SQL model.

I have an edit page created which lists all the profile values of a user.  The edit page inherits the User model.  One of the editable values is the RoleId field.  I want to set this up to be a drop-down list that contains items labeled using the RoleName column of the Roles table, and matched with values of RoleId.

How can I achieve this?

Can't Find DropDownList In Control Parameter

I have a page with 2 Content Controls. Content1 has a SqlDataSource with a Control Parameter
that uses a Dropdown list. The dropdownlist is in Content2. I used viewsource to get
the dropdownlist control name which was
ctl00_ContentPlaceHolder6_ddlPersonFilter. I also got an error if I used ddlPersonFilter.
Thanks for any assistance.

Could not find control 'ctl00_ContentPlaceHolder6_ddlPersonFilter' in ControlParameter ''.

<%@ Page Title="Deal ToDos" Language="VB" MasterPageFile="~/Protected/secureds_deal.master" 
                            EnableTheming="true" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<%@ MasterType 

populate specific data from table

I am trying to build an application.I have table in my database named tbl_customer.I am able to display all the customers information using MVC i.e Name,Designation, Address, PhoneNumber, Sex etc.Now I Want To Display Customer only Having Sex "Female" (Sort Out Data From tbl_customer)How I Can Do This???I Am New To Asp.net.. I Am Using VS 2010, SQL Server 2005Help In This Context, Appreciated In Advance..Regards

2 questions - Dropdownlist from SQL Table and Insert into several tables

We're trying to convert an older access app with a sql server back end (with many tables) to Sharepoint. There are entry forms, update forms, look up forms, reports, etc the 2 questions I have are: 1. How can I create a dropdownlist that gets its items from a SQL table? 2. How can I create a form that, when filled out, puts items into multiple tables? Basically, I'd like to know if any of this is possible in 2010, and does anyone have any tips on where to start?    

DropdownList Selection to Populate TextBox

I have a dynamically generated dropdownlist, that lists e.g. Company Names. I want to be able to select a particular Company and display associated information e.g. Name, Address, City, State... etc. in text boxes adjacent to the list. I am trying to fire the following code from the dropdownlist "OnSelectedIndexChanged" property, but cannot 1) get the code to fire upon selection, and 2) populate the text boxes... any suggestions are appreciated!! Thanks CODE:     Public Sub DropDownList1_SelectedIndexChanged(ByVal sender As Object, ByVal e As EventArgs) Handles Facility.SelectedIndexChanged Dim FacilityAddressDetail As String  Dim FacilityAddress2 As String  Dim FacilityCity As String  Dim FacilityState As String  Dim FacilityZip As String Dim   FacilityAddressDetail = FacilityAddress2 = FacilityCity = FacilityState = FacilityZip =       mySettingsSIC = AppSettings   dgiSelectedIndexChange As DataGridItemFor Each dgiSelectedIndexChange In myDataGrid.ItemsCType(dgiSelectedIndexChange.FindControl("FacilityAddressDetail"), TextBox).TextCType(dgiSelectedIndexChange.FindControl("FacilityAddress2"), TextBox).TextCType(dgiSelectedIndexChange.FindControl("FacilityCity"), TextBox).TextCType(dgiSelectedIndexChange.FindControl("FacilityState"), TextBox).TextCType(dgiSelec

how to auto-fill and populate a repeating table from other sources?

I have a repeating table and users will enter values to a column. With the column, I would like to auto-generate a list of checkboxes for user to check in another place on the form (any control?)? Seems in Infopath, you can not loop a list; and you can not insert item with actions to a repeating table?

hoq to fill gridview dropdownlist from another db table

Hi, I have a gridview which gets its data from a database table now i ghave added a dropdownlist to this gridview but this dropdown should get the data from another table and should set its value automatically with a foreign key from the  gridview i have added the code like below in my rowDatabound but it just loads 1 field and then how should i get the selectedValue according to the gridview id field?? Protected Sub Friends_RowDataBound(ByVal sender As Object, ByVal e As GridViewRowEventArgs)             If e.Row.RowType = DataControlRowType.DataRow Then                 Dim conn As New SqlConnection(HttpRuntime.Cache("con"))                Dim sql As String = "select ID,ListName from FriendList order by ListName asc"                Dim cmd As New SqlCommand(sql, conn)                cmd.CommandType = CommandType.Text                conn.Open()             &

Populate Sql Table

I'm really unsure of what was the best title for this question, It's a rather complex SQL Insert Statement, at least I know it's way beyond anything i've seen. I'm planning on using the SQL Agent to run this Import once a day. Here are the Tables: Submittal                                       Default Values Date                                              City Hour (1-24)                                    Minimum Minimum                                        Maximum Maximum                  &nb

DataList/FormView won't populate DropdownList

I have a ddl inside the formview that I can't figure out how to wire up properly. The formview contains detail info, but the ddl needs to list the entire set to items. Then I want the ddl's selected value be set from the recordset intended  for the formview. I think it's just a timeing issue s I would like your help. Thanks, - EJM. Here my code somewhat reduced to save space...<asp:DataList Width="700" ID="DlMembers" runat="server" DataKeyField="Ident" OnItemCommand="DlMembers_ItemCommand" OnDeleteCommand="DlMembers_DeleteCommand" > <HeaderTemplate> <table border="1" cellpadding="2" cellspacing="0"> <tr align="left" valign="top"> <th nowrap>First Name</th><th nowrap>Last Name</th><th nowrap>Address</th><th nowrap>Email</th><th nowrap>Home Phone</th><th nowrap>Work Phone</th><th nowrap>Cell Phone</th><th nowrap>Position</th><th nowrap>Admin</th><th nowrap>Comments</th><th> </th><th> </th></tr></HeaderTemplate><ItemTemplate>

Populate DropDownList in InsertItemTemplate after insert

I thought this one would be easy, but no go. What I am trying to do is the following: I have two DropDownLists in my InsertItemTemplate, each bound to its own datasource. After the fields in this form have been filled out and the ItemInserting event fires, I rebind the ListView to its datasource, but the DropDownLists turn out empty. I tried to bind them in the ItemInserting event and it seems they get filled, but nothing shows up in them when the page loads. I also tried to fill them in the ItemDataBound event, but the e.Item.ItemType == InsertItem doesn't do it. What is the solution?

How can I select Table by pussing parameter table name


How can I Create Select store proc for select Table but I will send the Table Name in Parmeter which table I want Like below.



Proc SelectAll







Populate dropdownlist in Edit mode programatically


I'm trying to programatically populate some dropdownlists inside a formview in EDIT mode, like this below.

 Dim FVM As String = FormViewMemberProfile.CurrentMode.ToString

        If FVM = "Edit" Then

            Dim ddlDays As DropDownList = CType(FormViewMemberProfile.FindControl("ddlDays"), DropDownList)
            Dim ddlYears As DropDownList = CType(FormViewMemberProfile.FindControl("ddlYears"), DropDownList)

            Dim i As Integer = 1

            For i = 1 To 31

            Dim k As Integer

            For k = 1930 To 2008

        End If

I orginally had this running as part of the pagelaod event, but I'm thinking that b/c the page loads first, it doesn't populate the fields in EDIT mode until after the data is saved, and then page is reloaded. Now it knows it's in "Edit" mode. Am I thinking clearly here? Not sure if this is the order of things... Anyhow...

So I thought I should just use a formview_modechanged (or similar event) so when the user switches modes, it populates the fields - but I'm not sure which event I should use. I've tried "Modechanging", "modechanged", "prer

Drop tables where table name is a parameter


I'm trying to drop some tables and I created a curser to do so.

The table name is a parameter.

I get an error message when I run this code in the curser.

Is there any way to run this code in a different way.

I'm trying to drop databases as well where database name is a paramerter, can I do so?





@DatabaseName varchar(30)




Search data from sharepoint list and populate repeating table (Seach text should be entre in first f


Hi All,

I am newbie to infopath.

I have assignment to search data from sharepoint list and display it to repeating table. Below is the case in detail.

i. User enter search text in first textbox of repeating table.

ii. After text enter you will Enter or click tab button.

iii. As user press Tab /Enter, the other textboxes of repeating table will populate with data automatically.

iv. If searched data rows are more then one, then dynamically add new row's in repeating table and  show searched data.

I am working at offical assignment and it's deadline is very tough. i had made extensive search at google and msdn forum but unable to accomplish. I would appreciate and thanks is some provide me solution in form to a small infopath application and code snippet.




AJAX DropDownList won't populate.. error500.. code is working though.


Here's what I have.  I was able to debug and traverse through the webservice and return teh array back into the first call method of: return new CarsService()..  But back in the page_load method, I can't get it to update and show up in the page.  what am I doing wrong?!?!


<asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode="Conditional">
                    <cc1:CascadingDropDown ID="CascadingDropDown1" runat="server" TargetControlID="DropDownList1"
                     Category="Make" PromptText="Please select a make" LoadingText="[Loading makes...]"  

Populate ASP Table from Text File


Hey Guys, new developer here. I'm trying to populate a ASP table dynamically. This is what I'm trying to do.

I have table with 1 row and 4 cells. I want to import information from a text file into the various cells. Each line of the text file is what I want to go into each cell.

For example if the text file reads:





I want each line to go into each cell. Is this possible, or will I need to create a SQL Server table and read from that? THANKS!

Need help to populate dropdownlist using Javascript


Hi, I'm doing a simple HTML form, that requires two dropdownlist - one that populates the month, and the other to populate the dates based on the month. For example, in January, there are 31 days. So the "date" dropdownlist will populate 1-31 in the "month" dropdownlist. The "date" dropdownlist will change to 1-28 for February when selected and so on...  Can someone please help me with the javascript section? I'm coding using javascript.

Many Thanks!


<title>Test Form</title>
<script language="JavaScript">
function testDate(){

var MonthDays = new Array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
var count = 0;
 if(location.href = document.form1.month.options[document.form1.month.selectedIndex].value) {
  for(var i=1; i<=(MonthDays[count]); i++) {
   document.writeln('<option value="'+i+'">' + i + '</option>');



<form id="form1" name="form1" method="GET">
  <label>Post Reminder:<br />
  <input type="text" width

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend