P
Peter Morris
<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master"
AutoEventWireup="True" CodeBehind="Modify.aspx.cs"
Inherits="MyWebsite.Views.CollateralTypeAdmin.Modify" Title="Untitled Page"
%>
<asp:Content ID="Content" ContentPlaceHolderID="MainContentPlaceHolder"
runat="server">
<h2>Modify collateral type</h2>
<form action="/CollateralTypeAdmin/Update/<%= ViewData["ID"] %>"
method="post">
Name : <input name="Name" maxlength="64" value="<%= ViewData["Name"] %>"
/><br />
License generator :<select id="LicenseGeneratorSelector"
name="LicenseGenerator" runat="server"/><br />
<button type="submit">Save</button>
</form>
</asp:Content>
In the above example I have a <select> with runat=server. I want the name
to remain as "LicenseGenerator" but it is rendered like so
<select name="ctl00$MainContentPlaceHolder$LicenseGeneratorSelector"
id="ctl00_MainContentPlaceHolder_LicenseGeneratorSelector">
As I am now using viewstate etc and want full control over my html how do I
stop ASPX from renaming my control?
Thanks
Pete
AutoEventWireup="True" CodeBehind="Modify.aspx.cs"
Inherits="MyWebsite.Views.CollateralTypeAdmin.Modify" Title="Untitled Page"
%>
<asp:Content ID="Content" ContentPlaceHolderID="MainContentPlaceHolder"
runat="server">
<h2>Modify collateral type</h2>
<form action="/CollateralTypeAdmin/Update/<%= ViewData["ID"] %>"
method="post">
Name : <input name="Name" maxlength="64" value="<%= ViewData["Name"] %>"
/><br />
License generator :<select id="LicenseGeneratorSelector"
name="LicenseGenerator" runat="server"/><br />
<button type="submit">Save</button>
</form>
</asp:Content>
In the above example I have a <select> with runat=server. I want the name
to remain as "LicenseGenerator" but it is rendered like so
<select name="ctl00$MainContentPlaceHolder$LicenseGeneratorSelector"
id="ctl00_MainContentPlaceHolder_LicenseGeneratorSelector">
As I am now using viewstate etc and want full control over my html how do I
stop ASPX from renaming my control?
Thanks
Pete