VDS Technologies

 

Update feature attributes??

11/14/2017 3:17:07 AM
Total Posts 17

Update feature attributes??

dear forum,,

 

I have a postgres database layer with point shape type. Now I am able to save new features into database.  But i want to save feature attributes as well which are entered by the users. So that how can i display user form with number of textbox and submit button to save feature attributes into database.

 

any suggestion will be appreciated........

11/14/2017 11:17:39 AM
MVP
Total Posts 326

Re: Update feature attributes??

Update the Recodset fields, then call the Recordset.Update method, as shown in the ShapeEditor.aspx (or LocationEditorApp.aspx) sample for the TITLE field.

 

    void UpdateShape(string id, string title, Shape shape)
    {
        AspMap.Layer layer = map["polygons"];
        layer.EnablePassthroughQuery = true;

        AspMap.Recordset rs = layer.SearchExpression("ID = " + id + "");

        if (!rs.EOF)
        {
            rs["TITLE"] = title;
            rs.Shape = shape;
            rs.Update();
        }
    }

11/16/2017 12:28:03 AM
Total Posts 17

Re: Update feature attributes??

Actually I want to know how can I display ASP form in AspMap InfoWindow to update point attributes..

11/17/2017 9:04:11 AM
MVP
Total Posts 326

Re: Update feature attributes??

InfoWindow is created dynamically and cannot conatin a Form because an ASPX page can contain only one Form object, which already exists. The LocationEditorApp sample demonstrates how to edit location attributes.