.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

Drag and drop field from db into HTML table cell possible?

Posted By:      Posted Date: October 19, 2010    Points: 0   Category :ASP.Net


I'm used to Dreamweaver where this is possible. I find it hard to believe that I would need to use a 1 column gridView control.

Is there a way to drag one field from the db Explorer window onto my page and NOT get a grid view?

Or alternatively, I used to be able to put something like this in ASP classic (years ago!) <%= Eval("User") %>

Any help would be SO appreciated.


View Complete Post

More Related Resource Links

how can i drag and drop fields of table in teh desing surface


I am followint the insructions of this walkthrough of VS2003


adn in a part say this

  •  8   Find the authors node and expand it to show the fields in the authors table.
  •  9   Using CTRL+Click, select the au_id, au_lname, au_fname, and city fields.
  •  10  Drag these fields from Server Explorer onto the design surface
  • Now i am using VS2008 

    When i try to drag and drop i can not made it is maybe because of the differences between 2003 and 2008 versions

    how can do it in VS2008?


    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

    Regular Expression to Match
    in HTML


    Here is the kind of text I want to match via a regular Expression

    The id="dgSchedule" is always present in the TAG but its location may differ

    The table is span over multiple line/contains white spaces/tabs...

    I have the regular expression to match the start and end tag respectively over a single line

    \<table .*\>


    The problem is to match the whole table span over multiple lines

    <table cellspacing="0" rules="all" border="1" id="dgSchedule" style="border-style:None;height:100%;width:100%;border-collapse:collapse;">
    	<tr class="blackbar" align="center" style="background-color:#7FB4DE;font-family:Verdana;font-weight:bold;height:20px;">
    		<td>From Place</td><td>To Place</td><td>Time</td><td>Bus Type</td>
    	</tr><tr style="background-color:#DEECF5;">
    	</tr><tr style="background-color:#EFF5FA;">
    	</tr><tr style="background-color:#DEECF5;">

    HTML Table Disable


    I have a HTML Table that I use to place the control in so they display nicely on my Web Form.  I also use the Disable method to keep unwanted users from editing those controls based on their log in information, however I still want the information to be displayed for their review.

    The information is displayed for example in the Text Boxes, however when they hit Enter on the form because the table is disabled for some reason the information is lost when I do my update to the SQL Server (the text box shows "")?

    Why is it I can see the information on the screen, but the text box shows empty when hitting enter on the form?



    Change grid view from table to other HTML layout



    You'll have to excuse my ignorance, I'm coming at this from a front-end perspective, and don't really know how to deal with data views in ASP.NET.

    Basically, I'm trying to change the layout of some repeated data from a straight table, to something more design-heavy.  It's the same data, just re-organised slightly.  The current ASP.NET code looks like this:

                        <asp:GridView ID="GVMoments" runat="server" AllowPaging="True" AllowSorting="True"
                            AutoGenerateColumns="False" PageSize="20" RowHeaderColumn="FirstName"
                            SkinID="GroupSkin" DataKeyNames="moment_id" 
                            <PagerSettings Mode="NumericFirstLast" PageButtonCount="20" Position="TopAndBottom" />
                            <RowStyle />
                                    <asp:BoundField DataField="moment_id" HeaderText="moment_id" ReadOnly="True" SortExpression="moment_id"
                                        Visible="False" In

    FormView Text Field Being Set by A Drop Down List


    Hello, I have a FormView which is used to insert a record into a database.  Outside of this formview i have a drop down list, I want to grab the value from that drop down list and set one of the text fields within the formview to it's currently selected value.  I've tried the following code, but the dynamic categorytextbox line is what seems to not be working.

                        <asp:DropDownList ID="ddlCategory" runat="server" AutoPostBack="True" 
    DataSourceID="SqlDataSourceCategory" DataTextField="CategoryName"
    DataValueField="CategoryID" Width="200px">

                                <asp:TextBox ID="CategoryIDTextBox" runat="server" 
    Text='<%# Bind("CategoryID") %>' Visible="False" />

            protected void FormView1_DataBound(object sender, EventArgs e)
    dynamic varCategory = ddlCategory.SelectedValue;
    dynamic categoryTextBox = FormView1.FindControl("CategoryIDText

    Model Binding the values in an HTML Table back to Controller / Model


    Currently, I am working with ASP.NET MVC1 and am still learning about Model Binding and how values from a View are passed back to the Controller / Model. Specifically, I want take an existing Model, create a Table and populate the Rows of the Table, allow the user to edit some fields and pass it back.

    In my example, I have a Class called "Ingredient" which has 4 public accessors:  Name, Barcode, Amount, and Unit

    <%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<MvcACE.DomainModel.Entities.Ingredient>>" %>

    <% using (Html.BeginForm("SubmitOrder","MyController"))
    { %>

    <% if (Model != null)
    foreach (var item in Model)
    { %>
    <td><%= Html.Encode(item.Name)%></td>
    <td><%= Html.Encode(item.Barcode)%></

    blank row in HTML table?


     is there any way to inset a couple of blank rows into an html table, or do I need to create a separate <table> with a couple of <br> in between?

    Asp.Net Treeview Drag n Drop


    Hello all

    How to make asp.net treeview drag and drop enabled on web. I am unable to find any javascript and there is not any event to make treeview drag and drop enabled.

    Kindly suggest me how to use drag and drop facility in treeview.

    I don't want to use any third party utility.

    waiting for reply..........


    Thanks in advance

    Listview - Drag and Drop?


    Hey everyone, I have a treeview and a listview on my ASP.NET application. However, with treeview I can drag and drop it to where ever I want it on my page. I tried this with listview, but it wouldn't let me. Listview automatically positions itself along the left side of my application. What I'm wanting to do is put my treeview along the right side and then put my treeview along the left side of the application. Any ideas on why I can't do this or suggestions on how I might be able to do this?

    By the way, I'm running Visual Studio 2010 and using .NET FRAMEWORK 4.

    Drag and Drop data binding and Enums

    I'm using Visual Studio 2010 to design a simple WPF application. I created a simple class, with some Enum property, and added the class as a new data source, then dragged and dropped it from the Data sources window as a DataGrid. The result is a data grid that works properly, except for enum handling. Obviously, I want enums to be displayed as combo boxes, so I set the option. The problem is: I get a combo box column, but it is NOT populated with the Enum's values, instead only the current value is displayed and the user can't change it. This behavior seems completely useless to me. Am I doing something wrong here, or is there another explanation for this? Why isn't the designer handling enums in a sensible way? Another problem is, if I choose to drag the class as "Details". Again everything works except enums. I get a standalone combobox, but it displays the values of the property from the entire list, and choosing a different item in the combobox changes the active bound property. Once again, useless behavior - I expect the designer to create a combobox populated with values from the Enum, and for it to act like every other control in a master-details relationship - choosing a different value changes the state of the current item. Please advise.

    displaying the html table as a pdf document

    well the question is simple but i searched all over, found crystal reports found many toolsbut the problem isi cannot use an other tools, or libraries other then the default with vs08 sp1i cannot use crystal reports, as its datasource is dataset or xml none of which is theremy page on users click of button generates a html table and info within using c# code behind (i.e. at runtime) so how to write this stream to browser such that it becomes a valid pdf file?

    Creating a custom drop down field type with SelectedIndexChanged Event

    Hi All, I am trying to create a custom drop down field type and I was able to acheive that using the MS link http://msdn.microsoft.com/en-us/library/bb861799.aspx. As per the link, once the custom field is created we can override the "Validate" method to write the Validation logic and that works fine for me too. However I am facing a challenge even before going to Validate . Let me explain my actual requirements here. I need to build a custom drop down field and expose the field to the user in "Edit Properties " Page of a document library. Along with this field, I will be having some OOB site columns in the Edit Properties Page (Ex: Title, Subject etc)  . When user selects a value in the drop down, I need to hide/show few OOB site columns based on certain criteria.  I am facing a challenge of how to capture the "SelectedIndexChanged " event for the Custom drop down field in Sharepoint (Can we wire the SelectedIndexChanged event to a custom dropdown field type) ? Is this acheivable in SP 2010 Custom field type ? If so, how can I do it ? Can any of you kindly help me here?   Regards, Yesh

    GiveFeedback @ Drag and drop

    Hi guys, i setup a little test app. There is only a stackpanel with some buttons and a black rectangle... Its possible to drag and drop the rectangle into the stackpanel! Now i would like to provide feedback to the user! The ui element in this case the black rec should be placed near the cursor... Exmaple: http://livedocs.adobe.com/flex/3/html/help.html?content=dragdrop_7.html I don't have a idea todo that... please help me with some nice code! thanks :) private Point startPoint; public MainWindow() { this.InitializeComponent(); rect.PreviewMouseLeftButtonDown += (s, e) => { startPoint = e.GetPosition(null); }; rect.MouseMove += (s, e) => { Point mousePos = e.GetPosition(null); Vector diff = startPoint - mousePos; if (e.LeftButton == MouseButtonState.Pressed && Math.Abs(diff.X) > SystemParameters.MinimumHorizontalDragDistance && Math.Abs(diff.Y) > SystemParameters.MinimumVerticalDragDistance) { Rectangle r = s as Rectangle; DataObject dragData = new DataObject("rect", r); DragDrop.DoDragDrop(r, dragData, DragDropEffects.Move); } }; stack.AllowDrop = true; stack.DragEnter += (s, e) => { if (!e.Data.GetDataPresent("rect") || s == e
    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