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


Top 5 Contributors of the Month
Kaviya Balasubramanian
Sgraph Infotech
Imran Ghani
Post New Web Links

How do I drop a drop down box into a details view ?

Posted By:      Posted Date: September 18, 2010    Points: 0   Category :ASP.Net
 
SO I've got a Details View control which I can insert data into my database with OK.However, in one of the text fields I want to limit what the user can insert to a set of key words. So the obvious thing to do is to present the User with a drop down box to select a key word.So I have converted the text field into a template and I thought I could replace the <InsertItemTemplate> in the details view with the drop down box. Well it looks like what I want but when I INSERT the data that field is not inserted into the database.So I guess I need to Bind the Drop Down somehow to the Insert - How do I do that ?My code is below; <asp:DetailsView ID="DetailsView1" runat="server" Height="50px" Width="125px" AutoGenerateRows="False" DataKeyNames="dateID" DataSourceID="SqlDataSource1" DefaultMode="Insert"> <Fields> <asp:BoundField DataField="dateID" HeaderText="dateID" InsertVisible="False" ReadOnly="True" SortExpression="dateID" /> <asp:TemplateField HeaderText="diaryDate" SortExpression="diaryDate"> <EditItemTemplate> <asp:TextBox ID="TextBox1" runat="server" Text='<


View Complete Post


More Related Resource Links

if 'other' from drop down is selected, the respective details textbox is now validated using a req

  
Hi, I'm developing a system with a number of drop down lists. One of the questions relates to the light conditions at the time of the incident (for example, it could be dark, poorly lit, dusk etc...)One of the options on the drop down list is 'other'. (i argue with my client that if they're using dropdown lists, don't use other, but they disagree)The next field is 'If other, please give details'. What i'm basically looking to acheive is to say that if you select 'other' from the dropdown list, the 'if other' field becomes required using a requiredfield validator. (and the reverse too, so if you choose a pre-poulated answer such as 'dusk', the 'if other' field is not required.)I have all my other validations working fine and my drop down list is populated from an SQLDatasource (not ASP.net Items)My dropdown list id= ddlLightMy 'other' field id= txtbxLightOtherMy required validator for the 'other' field id= requiredvalLightOthermy sqldatasource id= sqldatasourcelightI'm thinking something like this, but it's not quite working for me:If ddlLight.Text = ("other") Thentxtbxlightother...Any assistance would be great. I've done this before and i'nm frustrating myself as i can't seem to work it out!ThankMike

Drag drop functinality not working on Explore View control for file containing special characters in

  
We have created a control which uses explorer view control for file drag and drop. This functinality works fine for a file having filename without special characters but it gives an error if we drag and drop a file having special characters in the file name. The reason for this is Sharepoint uses WebDAV protocol for file transfer to the Sharepoint document library and WebDAV protocol has limitation that it does'nt accept file with special characters. Please let me know the way how I can accomplish drag and drop of file with special characters in file name, onto Explorer View control with WebDAV.

Drag drop functinality not working on Explore View control for file containing special characters in

  
We have created a control which uses explorer view control for file drag and drop. This functinality works fine for a file having filename without special characters but it gives an error if we drag and drop a file having special characters in the file name. The reason for this is Sharepoint uses WebDAV protocol for file transfer to the Sharepoint document library and WebDAV protocol has limitation that it does'nt accept file with special characters. Please let me know the way how I can accomplish drag and drop of file with special characters in file name, onto Explorer View control with WebDAV.

Change order for list view drop down

  
I may be overlooking something obvious, but I have not been able to find an easy way to sort the views available in the view drop down for lists.  We're migrating to 2010 from WSS 3.0 and currently, the view drop down is sorted alphabetically.   Help?

drag and drop windows explorer view in moss

  

For uploading or copying large number of documents i can use windows explorer view in moss.

Is this view requires administrative permission.

Suppose i have a workflow for each document in the library,If i copy in bulk documents to the library.will the workflow be attached by default.

Any suggestions..


drop down list in form view

  

hi all..


i have create a simple form using form view...

in my form i have use DropDownList..(Id = DropDownList1)

when am trying use that dropdownlist in my cs page i can't get id..

what is the problem actually..


Form View: Filtering Drop down on insert using objectdatasource

  

Hi,

I have a grid view which display different phone types with insert,edit and delete options.

During insert in the modal formview I have dropdown for different phone types which is bound to an
object datasource. The object datasource displays all the available phone types including the ones
displayed in the gridview

How do I display only the values that is not in the gridview. I tried setting the object datasource to a different one
and it does not work ( in Item created event). It display no values in the dropdown when I know there is more than 1 availble.


How do I change the object datasource during insert or how do I filter the values in the dropdown.

THanks

Suresh'

 

protected void FormViewOnlinePhone_ItemCreated(object sender, EventArgs e)
{
         FormView fvPhone = (FormView)FindControl("FormViewOnlinePhone");

         DropDownList dropdownUsage = (DropDownList)fvPhone.FindControl("DropDownListPhoneType");
         DataSet dsType = new DataSet();
         if (FormViewOnlinePhone.CurrentMode == FormViewMode.Insert)
         { 
            dsType = psClass.GetInsertPhoneTypes(application_id);
              dropdownUsage.DataSource = dsType.Tables["usage"];
             dropdownUsage.DataTextField="NAME&quo

Using Drop down menu in a grid view control for entering new data

  

I wish to use drop down menu(based on a table of my database) to update/insert data in a web form. The data is then fetch in to SQL table (Express).

How to do it ? 


Drop down list inside Detail view

  

I am using a drop down list control inside Detail View but for some reason, its not picking up the selected value from database , secondly not being able to update the values either...Any idea?

<%@ Page Title="" Language="VB" MasterPageFile="~/__admin/_codefiles/Masterpages/admin.master"
    ValidateRequest="false" AutoEventWireup="false" CodeFile="ArticleTypeDetail.aspx.vb"
    Inherits="__admin_Admin_ArticleTypeDetail" %>

<%@ Register TagPrefix="tinymce" Namespace="Moxiecode.TinyMCE.Web" Assembly="Moxiecode.TinyMCE" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadPlaceHolder1" runat="Server">
    <style type="text/css">
        .DataField
        {
            width: 300px;
            height: 50px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div style="padding-left: 22px;">
        <table cellpadding="0" cellspacing="0">
            <tr>
                <td>
                    <div class="admin_blue_box">
                        Select the article type
           

After applying custom master page, "Current View" drop down is no longer functional on Lists

  

The "Current View" drop down is not dropping down anymore when on the list library ribbon with a custom master page applied. Of course, it does work fine with v4.master. I would list all the custom master page changes however they are numerous. So I am looking to see if there are any ribbon experts that can give me things to at least look for. I would really appreciate it! Thanks!


Binding the multiple drop down boxes in GridView using JQuery in ASP.NET

  
Here is the code for binding the multiple drop down boxes in GridView using JQuery in ASP.NET

Drop-Right/Left submenus

  

 I'm currently using the CurvedMenuProjects custom control and I does almost everything I need a Menu Control to do but it doesn't swap submenu position (left/right) when the dropdown goes off the right edge of the screen.

 

Does anybody know if it's possible to configure the control to do this?

 

Any pointers on how I can get started writing the behavior into the custom control myself?

 

Thanks,

X


Wicked Code: Drag and Drop with ASP.NET AJAX

  

Jeff Prosise shows how you can implement drag-and-drop functionality in your Web app with ASP.NET AJAX.

Jeff Prosise

MSDN Magazine January 2008


ASP.NET: Web Forms Let You Drag And Drop Your Way To Powerful Web Apps

  

Web Forms have the potential to change Web programming by introducing a new programming model built around server-side controls-a model in which controls render their own UIs by generating HTML to return to clients and firing events that are handled by server-side scripts. Since all the action takes place on the Web server, virtually any browser can run a Web Forms app. And thanks to Visual Studio .NET, building a Web Forms app is a lot like using Visual Basic: just drop a control onto a form then write an event handler. This article describes the Web Forms programming model, how it fits with ASP.NET, and introduces DataGrid, TextBox, and other classes in the .NET Framework class library.

Jeff Prosise

MSDN Magazine May 2001


Scott Howlett and Jeff Dunmall: Drag and Drop Data Manipulation Powered by XML

  

Building on the browser-based org chart featuring VML (Vector Markup Language) described previously in Microsoft Internet Developer, this article takes you through the process of refining that sample app by using XML, XSL, and JScript code to create a new, improved version. Drag and drop editing is added to the org chart interface thanks to built-in support found in Internet Explorer 5.0. XML and JScript allow data manipulated on the screen to be saved back to the server in its native format. The final product of this combination of XML, XSL, and VML is a high performance, scalable Internet app that uses processing on the client to reduce stress for the server.

Scott Howlett and Jeff Dunmall

MSDN Magazine March 2000


Way of adding items in Drop Down List or List Box using Javascript

  
The article Way of adding items in Drop Down List or List Box using Javascript was added by raja.s on Sunday, June 06, 2010.

Hi,script type="text/javascript"> function AddItem(Text,Value) { // Create an Option object var opt = document.createElement("option"); // Add an Option object to Drop Down/List Box document.getElementById("DropDownList"
Categories: 
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