473,378 Members | 1,037 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

DoPostBack mthod call not inserted into html when override Render

Hi Folks.
So I have a small problem. My DoPostBack function is not writen to
the HTML page nor are the asp:buttons calling the DoPostBack.

My Goal is to create a totaly dynamic web page where the server
generates the HTML based on a passed in parameter. In our case,
CustomerID. Every Customer ges a branded website with there logos and
webpage etc.. To Avoid having 1 ASP.Net application running for each
client I am attempting a more dynamic rout.

To do this I need to be able to get the Branding stuff and inject it
into the webpage.

This is accomplished with various controls.

the .aspx is suposed to generate the clients branded web page. This
usually contains some logos and borders. So it's basically a table
with background images.

Then in this table I have a .ascx user control. It's job is to
dynamically insert the client selected controls. The client is able to
choose the layout and what controls to place on the page. So this
..ascx html is retrieved from the database keeping in mind it's simply a
table where each cell references prefabed controls.

The prefabed controls are created and generate like any other control
and nothing further should be necessary to insert them into the branded
webpage.

So the important stuff from the default.aspx looks like this:

<%@ Register TagPrefix="branding" TagName="MainPage"
Src="MainPage.ascx" %>
<%@ Page language="c#" Codebehind="default.aspx.cs"
AutoEventWireup="false" Inherits="SandBox._default" %>

<form id="branding" method="post" runat="server">
<branding:MainPage id="ETranWebPage"
runat="server"></etran:MainPage>
</form>
The Mainpage control is the .ascx from above and it's html content is
retrieved from a database call based on Client and looks something like
this.
<Table>
<TR><TD>formatted HTML</TD></TR>
<TR><TD>
<control1 runat="server">
<Properties>
<Property
name="buttonText">login</Property>
</Properties>
</control1>
</TD></TR>
<TR><TD>Some extra stuff</TD></TR>
</table>

The MainPage control overrides Render. In Render it parses the XHTML
above and dynamically inserts the correct control.

This information is also retrieved from an XML file and stored in a
hashtable. Key=id. Notice the id value matches the above xhtml's
element.

<Control source="testControl1.ascx" id="control1"
className="SandBox.testControl1"/>

Since I cannot simplifiy this too much.. Here is the code behind the
render.

private void Render(XmlNode node, HtmlTextWriter output) {
IEnumerator iEnum;
IEnumerator nl =
((XmlNode)node).ChildNodes.GetEnumerator();
if(nl.MoveNext()==false) {
output.Write(node.Value);
}else{
do {
XmlNode n = (XmlNode)nl.Current;
if(n.GetType() == typeof(XmlElement)) {
XmlElement e = (XmlElement)n;
if(mPageControls.ContainsKey(e.Name)) {
this.RenderETranControl(e,output);
}else {
if(n.ChildNodes.GetEnumerator().MoveNext()==false) {
output.Write(node.Value);
}else{

output.Write(n.OuterXml.Substring(0,n.OuterXml.Ind exOf(">")+1));
this.Render(n,output);
output.Write("</");
output.Write(n.Name);
output.Write(">");
}
}
}else {
this.Render(n,output);
}
}while(nl.MoveNext());
}
}

public void RenderETranControl(XmlElement e, HtmlTextWriter
output) {
IEnumerator iEnum;

ETranWebControl control =
(ETranWebControl)mPageControls[e.Name];
Control c = (Control)LoadControl(control.source);
c.ID = control.id;
XmlAttributeCollection attributes = e.Attributes;
iEnum = attributes.GetEnumerator();
while(iEnum.MoveNext()) {
XmlAttribute attribute = (XmlAttribute)iEnum.Current;
}
iEnum =
e.GetElementsByTagName("Properties").GetEnumerator ();
if(iEnum.MoveNext()) {
XmlElement properties = (XmlElement)iEnum.Current;
iEnum =
properties.GetElementsByTagName("Property").GetEnu merator();
while(iEnum.MoveNext()) {
XmlElement property = (XmlElement)iEnum.Current;
string propertyName =
property.GetAttribute("name");
string value = property.InnerText;
Type controlType = c.GetType();
try{
PropertyInfo pInfo =
controlType.GetProperty(propertyName);
pInfo.SetValue(c,value,null);
}catch(Exception ex) {
// Add Logging
}
}
}
// Controls.Add(c);
c.RenderControl(output);

}

Here is the control's html
<%@ Control Language="c#" AutoEventWireup="false"
Codebehind="testControl1.ascx.cs" Inherits="SandBox.testControl1"
TargetSchema="http://schemas.microsoft.com/intellisense/ie5"%>

<asp:Button id="Button1" Text="Button" runat="server"></asp:Button>

and here we have the html output.

<script language="javascript" type="text/javascript">

</HEAD>
<body>
<form name="ETran" method="post" action="default.aspx"
id="ETran">
<input type="hidden" name="__VIEWSTATE"
value="dDwxMDQxNzA2MzQ5Ozs+K/wXsV22klaSnVgoGGt1YT6Hl94=" />

<Table><TR><TD>formatted HTML</TD></TR><TR><TD><input
type="submit" name="control1:Button1" value="login"
id="control1_Button1" />
</TD></TR><TR><TD>Some extra stuff</TD></TR></Table>
</form>
</body>
</HTML>

There is no doPostBack anything in the html output.
If you could help out I would greatly appreciate it!

Erik

Nov 19 '05 #1
4 4189
I think you are going about this the wrong way. If you have some time,
check out the Community server Starter Kit
(http://www.asp.net/Default.aspx?tabindex=8&tabid=47) and see how they go
about dynamically positioning controls.

I can give you a brief overview. In the database they'll have the list of
controls a user wants displayed and where that control is to be displayed,
say something like:

Control Parent
Weather.ascx LeftSide
Calendar.ascx LeftSide
Biography MainContent
then in code, they'll get the information and dynamically look for the
parent:

foreach (DataRow dr in someDataTableThatGotTheAbove.Rows){
Control container = Page.FindControl(Convert.ToString(dr("Parent")));
//can cache this looking in a hashtable
if (container != null){
Control c = Page.LaodControl(Convert.ToString(dr("Control")));
//error checking here would be nice
container.Controls.Add(c);
}
}

As you can see, the solution is considerably simpler. When you start making
use of common baseclasses or interfaces things become even smoother.

Karl
--
MY ASP.Net tutorials
http://www.openmymind.net/
"Zuel" <zu**********@yahoo.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
Hi Folks.
So I have a small problem. My DoPostBack function is not writen to
the HTML page nor are the asp:buttons calling the DoPostBack.

My Goal is to create a totaly dynamic web page where the server
generates the HTML based on a passed in parameter. In our case,
CustomerID. Every Customer ges a branded website with there logos and
webpage etc.. To Avoid having 1 ASP.Net application running for each
client I am attempting a more dynamic rout.

To do this I need to be able to get the Branding stuff and inject it
into the webpage.

This is accomplished with various controls.

the .aspx is suposed to generate the clients branded web page. This
usually contains some logos and borders. So it's basically a table
with background images.

Then in this table I have a .ascx user control. It's job is to
dynamically insert the client selected controls. The client is able to
choose the layout and what controls to place on the page. So this
.ascx html is retrieved from the database keeping in mind it's simply a
table where each cell references prefabed controls.

The prefabed controls are created and generate like any other control
and nothing further should be necessary to insert them into the branded
webpage.

So the important stuff from the default.aspx looks like this:

<%@ Register TagPrefix="branding" TagName="MainPage"
Src="MainPage.ascx" %>
<%@ Page language="c#" Codebehind="default.aspx.cs"
AutoEventWireup="false" Inherits="SandBox._default" %>

<form id="branding" method="post" runat="server">
<branding:MainPage id="ETranWebPage"
runat="server"></etran:MainPage>
</form>
The Mainpage control is the .ascx from above and it's html content is
retrieved from a database call based on Client and looks something like
this.
<Table>
<TR><TD>formatted HTML</TD></TR>
<TR><TD>
<control1 runat="server">
<Properties>
<Property
name="buttonText">login</Property>
</Properties>
</control1>
</TD></TR>
<TR><TD>Some extra stuff</TD></TR>
</table>

The MainPage control overrides Render. In Render it parses the XHTML
above and dynamically inserts the correct control.

This information is also retrieved from an XML file and stored in a
hashtable. Key=id. Notice the id value matches the above xhtml's
element.

<Control source="testControl1.ascx" id="control1"
className="SandBox.testControl1"/>

Since I cannot simplifiy this too much.. Here is the code behind the
render.

private void Render(XmlNode node, HtmlTextWriter output) {
IEnumerator iEnum;
IEnumerator nl =
((XmlNode)node).ChildNodes.GetEnumerator();
if(nl.MoveNext()==false) {
output.Write(node.Value);
}else{
do {
XmlNode n = (XmlNode)nl.Current;
if(n.GetType() == typeof(XmlElement)) {
XmlElement e = (XmlElement)n;
if(mPageControls.ContainsKey(e.Name)) {
this.RenderETranControl(e,output);
}else {
if(n.ChildNodes.GetEnumerator().MoveNext()==false) {
output.Write(node.Value);
}else{

output.Write(n.OuterXml.Substring(0,n.OuterXml.Ind exOf(">")+1));
this.Render(n,output);
output.Write("</");
output.Write(n.Name);
output.Write(">");
}
}
}else {
this.Render(n,output);
}
}while(nl.MoveNext());
}
}

public void RenderETranControl(XmlElement e, HtmlTextWriter
output) {
IEnumerator iEnum;

ETranWebControl control =
(ETranWebControl)mPageControls[e.Name];
Control c = (Control)LoadControl(control.source);
c.ID = control.id;
XmlAttributeCollection attributes = e.Attributes;
iEnum = attributes.GetEnumerator();
while(iEnum.MoveNext()) {
XmlAttribute attribute = (XmlAttribute)iEnum.Current;
}
iEnum =
e.GetElementsByTagName("Properties").GetEnumerator ();
if(iEnum.MoveNext()) {
XmlElement properties = (XmlElement)iEnum.Current;
iEnum =
properties.GetElementsByTagName("Property").GetEnu merator();
while(iEnum.MoveNext()) {
XmlElement property = (XmlElement)iEnum.Current;
string propertyName =
property.GetAttribute("name");
string value = property.InnerText;
Type controlType = c.GetType();
try{
PropertyInfo pInfo =
controlType.GetProperty(propertyName);
pInfo.SetValue(c,value,null);
}catch(Exception ex) {
// Add Logging
}
}
}
// Controls.Add(c);
c.RenderControl(output);

}

Here is the control's html
<%@ Control Language="c#" AutoEventWireup="false"
Codebehind="testControl1.ascx.cs" Inherits="SandBox.testControl1"
TargetSchema="http://schemas.microsoft.com/intellisense/ie5"%>

<asp:Button id="Button1" Text="Button" runat="server"></asp:Button>

and here we have the html output.

<script language="javascript" type="text/javascript">

</HEAD>
<body>
<form name="ETran" method="post" action="default.aspx"
id="ETran">
<input type="hidden" name="__VIEWSTATE"
value="dDwxMDQxNzA2MzQ5Ozs+K/wXsV22klaSnVgoGGt1YT6Hl94=" />

<Table><TR><TD>formatted HTML</TD></TR><TR><TD><input
type="submit" name="control1:Button1" value="login"
id="control1_Button1" />
</TD></TR><TR><TD>Some extra stuff</TD></TR></Table>
</form>
</body>
</HTML>

There is no doPostBack anything in the html output.
If you could help out I would greatly appreciate it!

Erik

Nov 19 '05 #2
That is interesting. I see how it would be much simpler.. Using a
data grid does simplify my MainPage logic. But this does not solve the
fact that our site is branded to look like our clients site. Our
company does bill payment. So when a person goes to say the electric
company website to pay there monthly bill they are redirected to our
servers for the bill payment process. We are selling this as a
seamless integration to their website and the user is not even supposed
to know he is no longer on his Electric company's website. A smart
user would realize the URL change however but that's how we are selling
the product.

My first idea was an IFrame that would only hold the bill payment
process and our clients could link us in that way. This would avoid us
having to deal with client images and background branding. But as I am
told, our clients don't know how to do this so it's not an option.
Thus I am stuck with 100 unique webpage's with similar functionality.
So for companyX we might have to check an account number before
paying, or some may log in with an account number and a username..
etc.. So we thought that we could capture 80% of our clients with
re-usable user Controls and the other 20% with more customization VIA
specifically customized controls or other.

So as you can see the website can vary a lot even though the content is
similar.

We currently do this branding using 1 ASP.net application and a
subdirectory for each client. All the pages inherit from common
components so the functionality is encapsulated under the hood from
these subdirectories. However, this presents a huge project to
maintain.. Another alternative is to have an ASP.net application per
client, but then our base code changes would not be reflected unless we
updated every client. And source control would be a nightmare with a
version per client.

We have decided the best approach is to have multiple versions of the
Application running on the ASP server. By version I mean code version
and not client version. Then we are creating a traffic cop that will
be able to direct what version a client is on based on a Database table
lookup. And as the examples I originally posted is to make the
projects more manageable..
Thanks for your response and I am looking into the start kits.

Erik

Nov 19 '05 #3
asp:buttons do not use __doPostBack as they are rendered as submit buttons,
so the browser will do the submit.

note: if you want your site to work with javascript disabled, asp:buttons
are the only postback control you should use.

-- bruce (sqlwork.com)
"Zuel" <zu**********@yahoo.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
| Hi Folks.
| So I have a small problem. My DoPostBack function is not writen to
| the HTML page nor are the asp:buttons calling the DoPostBack.
|
| My Goal is to create a totaly dynamic web page where the server
| generates the HTML based on a passed in parameter. In our case,
| CustomerID. Every Customer ges a branded website with there logos and
| webpage etc.. To Avoid having 1 ASP.Net application running for each
| client I am attempting a more dynamic rout.
|
| To do this I need to be able to get the Branding stuff and inject it
| into the webpage.
|
| This is accomplished with various controls.
|
| the .aspx is suposed to generate the clients branded web page. This
| usually contains some logos and borders. So it's basically a table
| with background images.
|
| Then in this table I have a .ascx user control. It's job is to
| dynamically insert the client selected controls. The client is able to
| choose the layout and what controls to place on the page. So this
| .ascx html is retrieved from the database keeping in mind it's simply a
| table where each cell references prefabed controls.
|
| The prefabed controls are created and generate like any other control
| and nothing further should be necessary to insert them into the branded
| webpage.
|
| So the important stuff from the default.aspx looks like this:
|
| <%@ Register TagPrefix="branding" TagName="MainPage"
| Src="MainPage.ascx" %>
| <%@ Page language="c#" Codebehind="default.aspx.cs"
| AutoEventWireup="false" Inherits="SandBox._default" %>
|
| <form id="branding" method="post" runat="server">
| <branding:MainPage id="ETranWebPage"
| runat="server"></etran:MainPage>
| </form>
|
|
| The Mainpage control is the .ascx from above and it's html content is
| retrieved from a database call based on Client and looks something like
| this.
|
|
| <Table>
| <TR><TD>formatted HTML</TD></TR>
| <TR><TD>
| <control1 runat="server">
| <Properties>
| <Property
| name="buttonText">login</Property>
| </Properties>
| </control1>
| </TD></TR>
| <TR><TD>Some extra stuff</TD></TR>
| </table>
|
| The MainPage control overrides Render. In Render it parses the XHTML
| above and dynamically inserts the correct control.
|
| This information is also retrieved from an XML file and stored in a
| hashtable. Key=id. Notice the id value matches the above xhtml's
| element.
|
| <Control source="testControl1.ascx" id="control1"
| className="SandBox.testControl1"/>
|
| Since I cannot simplifiy this too much.. Here is the code behind the
| render.
|
| private void Render(XmlNode node, HtmlTextWriter output) {
| IEnumerator iEnum;
| IEnumerator nl =
| ((XmlNode)node).ChildNodes.GetEnumerator();
| if(nl.MoveNext()==false) {
| output.Write(node.Value);
| }else{
| do {
| XmlNode n = (XmlNode)nl.Current;
| if(n.GetType() == typeof(XmlElement)) {
| XmlElement e = (XmlElement)n;
| if(mPageControls.ContainsKey(e.Name)) {
| this.RenderETranControl(e,output);
| }else {
|
|
| if(n.ChildNodes.GetEnumerator().MoveNext()==false) {
| output.Write(node.Value);
| }else{
|
| output.Write(n.OuterXml.Substring(0,n.OuterXml.Ind exOf(">")+1));
| this.Render(n,output);
| output.Write("</");
| output.Write(n.Name);
| output.Write(">");
| }
| }
| }else {
| this.Render(n,output);
| }
| }while(nl.MoveNext());
| }
| }
|
| public void RenderETranControl(XmlElement e, HtmlTextWriter
| output) {
| IEnumerator iEnum;
|
| ETranWebControl control =
| (ETranWebControl)mPageControls[e.Name];
| Control c = (Control)LoadControl(control.source);
| c.ID = control.id;
| XmlAttributeCollection attributes = e.Attributes;
| iEnum = attributes.GetEnumerator();
| while(iEnum.MoveNext()) {
| XmlAttribute attribute = (XmlAttribute)iEnum.Current;
| }
| iEnum =
| e.GetElementsByTagName("Properties").GetEnumerator ();
| if(iEnum.MoveNext()) {
| XmlElement properties = (XmlElement)iEnum.Current;
| iEnum =
| properties.GetElementsByTagName("Property").GetEnu merator();
| while(iEnum.MoveNext()) {
| XmlElement property = (XmlElement)iEnum.Current;
| string propertyName =
| property.GetAttribute("name");
| string value = property.InnerText;
| Type controlType = c.GetType();
| try{
| PropertyInfo pInfo =
| controlType.GetProperty(propertyName);
| pInfo.SetValue(c,value,null);
| }catch(Exception ex) {
| // Add Logging
| }
| }
| }
| // Controls.Add(c);
| c.RenderControl(output);
|
| }
|
| Here is the control's html
|
|
| <%@ Control Language="c#" AutoEventWireup="false"
| Codebehind="testControl1.ascx.cs" Inherits="SandBox.testControl1"
| TargetSchema="http://schemas.microsoft.com/intellisense/ie5"%>
|
| <asp:Button id="Button1" Text="Button" runat="server"></asp:Button>
|
| and here we have the html output.
|
| <script language="javascript" type="text/javascript">
|
| </HEAD>
| <body>
| <form name="ETran" method="post" action="default.aspx"
| id="ETran">
| <input type="hidden" name="__VIEWSTATE"
| value="dDwxMDQxNzA2MzQ5Ozs+K/wXsV22klaSnVgoGGt1YT6Hl94=" />
|
| <Table><TR><TD>formatted HTML</TD></TR><TR><TD><input
| type="submit" name="control1:Button1" value="login"
| id="control1_Button1" />
| </TD></TR><TR><TD>Some extra stuff</TD></TR></Table>
| </form>
| </body>
| </HTML>
|
| There is no doPostBack anything in the html output.
| If you could help out I would greatly appreciate it!
|
| Erik
|
Nov 19 '05 #4
Oh dear. Your correct. You see. My problem is that the events in the
controls are not being called when I click a button. I thought this
was due to the DoPostBack function.. :)

Sometimes one makes an assumption. Ok.. I thought it was the fact
that I was overriding the Render method that I was not getting the
events properly. In fact it's probably a lil' deeper than that.

Thanks..

No if I can figure out why the event handler is not calling the proper
event when the button is clicked I would be set!

Erik


bruce barker wrote:
asp:buttons do not use __doPostBack as they are rendered as submit buttons, so the browser will do the submit.

note: if you want your site to work with javascript disabled, asp:buttons are the only postback control you should use.

-- bruce (sqlwork.com)
"Zuel" <zu**********@yahoo.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
| Hi Folks.
| So I have a small problem. My DoPostBack function is not writen to
| the HTML page nor are the asp:buttons calling the DoPostBack.
|
| My Goal is to create a totaly dynamic web page where the server
| generates the HTML based on a passed in parameter. In our case,
| CustomerID. Every Customer ges a branded website with there logos and | webpage etc.. To Avoid having 1 ASP.Net application running for each | client I am attempting a more dynamic rout.
|
| To do this I need to be able to get the Branding stuff and inject it | into the webpage.
|
| This is accomplished with various controls.
|
| the .aspx is suposed to generate the clients branded web page. This | usually contains some logos and borders. So it's basically a table
| with background images.
|
| Then in this table I have a .ascx user control. It's job is to
| dynamically insert the client selected controls. The client is able to | choose the layout and what controls to place on the page. So this
| .ascx html is retrieved from the database keeping in mind it's simply a | table where each cell references prefabed controls.
|
| The prefabed controls are created and generate like any other control | and nothing further should be necessary to insert them into the branded | webpage.
|
| So the important stuff from the default.aspx looks like this:
|
| <%@ Register TagPrefix="branding" TagName="MainPage"
| Src="MainPage.ascx" %>
| <%@ Page language="c#" Codebehind="default.aspx.cs"
| AutoEventWireup="false" Inherits="SandBox._default" %>
|
| <form id="branding" method="post" runat="server">
| <branding:MainPage id="ETranWebPage"
| runat="server"></etran:MainPage>
| </form>
|
|
| The Mainpage control is the .ascx from above and it's html content is | retrieved from a database call based on Client and looks something like | this.
|
|
| <Table>
| <TR><TD>formatted HTML</TD></TR>
| <TR><TD>
| <control1 runat="server">
| <Properties>
| <Property
| name="buttonText">login</Property>
| </Properties>
| </control1>
| </TD></TR>
| <TR><TD>Some extra stuff</TD></TR>
| </table>
|
| The MainPage control overrides Render. In Render it parses the XHTML | above and dynamically inserts the correct control.
|
| This information is also retrieved from an XML file and stored in a
| hashtable. Key=id. Notice the id value matches the above xhtml's
| element.
|
| <Control source="testControl1.ascx" id="control1"
| className="SandBox.testControl1"/>
|
| Since I cannot simplifiy this too much.. Here is the code behind the | render.
|
| private void Render(XmlNode node, HtmlTextWriter output) {
| IEnumerator iEnum;
| IEnumerator nl =
| ((XmlNode)node).ChildNodes.GetEnumerator();
| if(nl.MoveNext()==false) {
| output.Write(node.Value);
| }else{
| do {
| XmlNode n = (XmlNode)nl.Current;
| if(n.GetType() == typeof(XmlElement)) {
| XmlElement e = (XmlElement)n;
| if(mPageControls.ContainsKey(e.Name)) {
| this.RenderETranControl(e,output);
| }else {
|
|
| if(n.ChildNodes.GetEnumerator().MoveNext()==false) {
| output.Write(node.Value);
| }else{
|
| output.Write(n.OuterXml.Substring(0,n.OuterXml.Ind exOf(">")+1));
| this.Render(n,output);
| output.Write("</");
| output.Write(n.Name);
| output.Write(">");
| }
| }
| }else {
| this.Render(n,output);
| }
| }while(nl.MoveNext());
| }
| }
|
| public void RenderETranControl(XmlElement e, HtmlTextWriter
| output) {
| IEnumerator iEnum;
|
| ETranWebControl control =
| (ETranWebControl)mPageControls[e.Name];
| Control c = (Control)LoadControl(control.source);
| c.ID = control.id;
| XmlAttributeCollection attributes = e.Attributes;
| iEnum = attributes.GetEnumerator();
| while(iEnum.MoveNext()) {
| XmlAttribute attribute = (XmlAttribute)iEnum.Current;
| }
| iEnum =
| e.GetElementsByTagName("Properties").GetEnumerator ();
| if(iEnum.MoveNext()) {
| XmlElement properties = (XmlElement)iEnum.Current;
| iEnum =
| properties.GetElementsByTagName("Property").GetEnu merator();
| while(iEnum.MoveNext()) {
| XmlElement property = (XmlElement)iEnum.Current;
| string propertyName =
| property.GetAttribute("name");
| string value = property.InnerText;
| Type controlType = c.GetType();
| try{
| PropertyInfo pInfo =
| controlType.GetProperty(propertyName);
| pInfo.SetValue(c,value,null);
| }catch(Exception ex) {
| // Add Logging
| }
| }
| }
| // Controls.Add(c);
| c.RenderControl(output);
|
| }
|
| Here is the control's html
|
|
| <%@ Control Language="c#" AutoEventWireup="false"
| Codebehind="testControl1.ascx.cs" Inherits="SandBox.testControl1"
| TargetSchema="http://schemas.microsoft.com/intellisense/ie5"%>
|
| <asp:Button id="Button1" Text="Button" runat="server"></asp:Button>
|
| and here we have the html output.
|
| <script language="javascript" type="text/javascript">
|
| </HEAD>
| <body>
| <form name="ETran" method="post" action="default.aspx"
| id="ETran">
| <input type="hidden" name="__VIEWSTATE"
| value="dDwxMDQxNzA2MzQ5Ozs+K/wXsV22klaSnVgoGGt1YT6Hl94=" />
|
| <Table><TR><TD>formatted HTML</TD></TR><TR><TD><input
| type="submit" name="control1:Button1" value="login"
| id="control1_Button1" />
| </TD></TR><TR><TD>Some extra stuff</TD></TR></Table>
| </form>
| </body>
| </HTML>
|
| There is no doPostBack anything in the html output.
| If you could help out I would greatly appreciate it!
|
| Erik
|


Nov 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: lkrubner | last post by:
I'd like to write a PHP script to be used from the command line on a Unix machine. I'd like for the script to put together a string, turn it into a web page, print it, then return control the...
3
by: Jason Dean | last post by:
Hello, I have a simple asp:label control that I want to write some complicated HTML to. Currently I have this code and it works fine: myLable.Text = "<p>this is my text</p>" Bust as my...
1
by: The Colonel | last post by:
I have a database of our company's HTML email templates - name, subject, etc. Well, some are for HTML emails, and the template_text column contains HTML. When I display in a datagrid, it REALLY...
3
by: John Hughes | last post by:
I'm trying to add a user control to a form via the pages render method and I get the following error : "Control 'Button1' of type 'Button' must be placed inside a form tag with runat=server" ...
0
by: John | last post by:
I'm trying to override the page's render method, and capture the result for processing, eg: protected override void Render(HtmlTextWriter writer) { //base.Render(writer); StringBuilder...
3
by: Allan Ebdrup | last post by:
We're pretty new to ASP.Net 2.0 and we're having a discussion about best practice when developing custom server web controls. I can see that in for example the Wizard control the table contained...
3
by: Tea Maker | last post by:
Hi, I was wondering if there's a way to call a function when a user presses on the "back" or "forward" buttons of the browsers. What I want is, redirect the user to a new website (let's say...
5
by: kchang | last post by:
I am trying to view my reports based on a linked table database. However both the reports and the queries they're based on give me a "odbc--call failed" error. When I click on help it cites error...
1
Prakash Gnana
by: Prakash Gnana | last post by:
How to remove a particular option in select box in HTML when clicked?
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.