Results 1 to 1 of 1

Thread: Passing SelectedValue from HTML.DropDownList to View

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Sep 2004
    Location
    Jakarta, Indonesia
    Posts
    818

    Passing SelectedValue from HTML.DropDownList to View

    Hi all,

    how to pass value from HTML.DropDownList to AJAX Action Link Helpers???
    i have this code, if i explicitly insert value to territryID..the View is populate correctly
    Code:
    @using (Html.BeginForm())
    {
    	@: Location @Html.DropDownList("territryID", (SelectList)ViewBag.Territory, "choose one")
    	@Ajax.ActionLink(
    		"ok",
    		"Info", new { territryID =  ????},
    		new AjaxOptions
    		{
    			InsertionMode = InsertionMode.Replace,
    			HttpMethod = "POST",
    			UpdateTargetId = "post1"
    		})
    
    	<div id="post1">
    	</div>
    }
    thx,
    erick
    Last edited by erickwidya; Jun 3rd, 2011 at 11:11 AM.

    1st NF - a table should not contain repeating groups.
    2nd NF - any fields that do not depend fully on the primary key should be moved to another table.
    3rd NF - there should be no dependency between non key fields in same table.
    - E. Petroutsos -


    eRiCk

    A collection of "Laku-abis" Ebook, Permanent Residence

    Access Reserved Words, a Classic Form Bug, Access Limitation, Know run Process and the Lock they hold in, Logging User Activity in MSSQL,
    Kill Database Processes

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width