data to go to a specific server. This runat looks like it is trying to
post to the asp page.
If I remove all instances of it, it looks like it works but it screws
up my page.
What does this command do and can I work around this?Runat sets where the code is to be processed for the item. The only
available option is server. This allows you to process code in the
code-behind for that item.
for instance, <table id="myTable" runat="server">... Will allow you to
access the table named myTable from your code behind. Note: for this to
work properly you may need to manually add the member to your code
behind as well..
protected System.Web.UI.HtmlControls.HtmlTable myTable;
now you'll have access to all the members of the HtmlTable myTable.
it's the same for all the drag and drop server controls as well.
-Rick
PS. To send the data to a specific server (database server) that is set
up by the data access logic components and the connection string
(SqlDataAdapter, SqlCommand, etc).
-Rick
More technically, runat="server" is something that ASP.NET compiler parses
for in order to turn an html tag into a server side control.
Karl
--
http://www.openmymind.net/
<mscurto@.gmail.com> wrote in message
news:1147269953.083936.260770@.i40g2000cwc.googlegr oups.com...
>I wrote an ASP Web App in Visual Studio and I want the user entered
> data to go to a specific server. This runat looks like it is trying to
> post to the asp page.
> If I remove all instances of it, it looks like it works but it screws
> up my page.
> What does this command do and can I work around this?
I wonder why this isn't simply the default action for asp.net controls.
Karl Seguin [MVP] wrote:
> More technically, runat="server" is something that ASP.NET compiler parses
> for in order to turn an html tag into a server side control.
> Karl
> --
> http://www.openmymind.net/
>
> <mscurto@.gmail.com> wrote in message
> news:1147269953.083936.260770@.i40g2000cwc.googlegr oups.com...
> >I wrote an ASP Web App in Visual Studio and I want the user entered
> > data to go to a specific server. This runat looks like it is trying to
> > post to the asp page.
> > If I remove all instances of it, it looks like it works but it screws
> > up my page.
> > What does this command do and can I work around this?
Using the runat and id attributes of a control you can access them
programmatically via code-behind. You can take a native HTML element
such as a table add unique id's to the table rows <TR> with the
runat="server" attribute and show/hide certain rows based on user input.
0 comments:
Post a Comment