Wednesday, March 21, 2012

Problem in using Atlas with UserControl

Hi,

I have a UserControl named as cppCombo.ascx , that is used inside another combo named as welcome.ascx, and this welcome.ascx is again used in Loginmaster.ascx and finally used in a aspx page.

Now the problem is that at the aspx page i am unable to know the EventName .

If you have any other better option then please post that.

Thanks & regards

shrikant

Try to use the triggers of a asp:UpdatePanel to trigger the events of a user control as the following codes.
<asp:UpdatePanel ID="upnlUserControl" runat="server">
????<ContentTemplate>
?????????<uc1:WebUserControl0 ID="WebUserControl0_1" runat="server" />
????</ContentTemplate>
????<Triggers>
?????????<asp:PostBackTrigger ControlID="WebUserControl0_1" />
????</Triggers>
</asp:UpdatePanel>
Wish this could help you.

I used the same but it shows an error.

Unknown server tag 'asp:PostBackTrigger'.

How should i solve this .


It is impossible that says "Unknown server tag 'asp:PostBackTrigger'" in Ajax Beta 2 or Ajax RC 1.0.Do you download the latest Ajax package and install it in your PC?If not,try to download it from this website - http://ajax.asp.net/default.aspx?tabid=47&subtabid=471 and install it in your PC.It should work fine.If not,can you post some codes here? I'd like to test it.

Actually i was using ATLAS and their was no such tag but now i have downloaded AJAX from the site you provided thanks for this.

Now the problem is that i have to implement AJAX in an already built website. With atlas i just took the ATLAS.dll and put that the bin folder of

my wesite and using its fascility . But now with AJAX i am confused , How should i embed it in the website.

Thanks and Regards

Shrikant


Don't worry about it.If create an old website with Atlas, you can take a look at this materials to upgrade it to the new Ajax RC 1 - http://ajax.asp.net/

Hi, I did the same as it was directed in the URL but now i have received another problem . now it gives an error that,

Sys.WebForms.PageRequestmanagerParserErrorException: The message Received from the server could not be parsed.

Common cause for the error are when the responseis modified by the calls to Response.Write(),response

filters, HttpModules, or server trace is enabled.

Details: Error parsing near '<script language='ja'.


Try to send your ajax website to my email box: v-jicwan@.microsoft.com? I'd like to test it.

Hi, Sorry i cant send you the project as it is not my personal. One reason that could behind this error may be the use of Response.Write

in the project , so now i am trying to replace it some how, soon i will tell you about the status .

Thanks & Regards

Shrikant


Hi, After replacing the Response.Write() now its not showing that error but Show an error from Java Script

Unknown Runtime Error.

Thanks & Regards

Shrikant


You can not use Response.Write method in behind code if you develop a web application based on Ajax framework. Can you post a simple web page with "javascript Unknown Runtime Error"? There are many reasons which can lead to javascript error. It is difficult to fix what causes it.

Hi, At present i am even confused whether i will be able to convert project from ASP.Net 2.0 to AJAX

The code gives error at this line.

updatePanelElement.innerHTML = rendering

Below is the value contained in updatePanelElement.innerHTML

Any other option that can help you to help me, please suggest..

<TABLE id=Table1 height=\"99%\" cellSpacing=0 cellPadding=0 width=\"100%\" border=0>

<TBODY>

<TR>

<TD width=141>

<P align=left>

<DIV id=contentContainer1_ctl00_Welcome1_pnlMain><LINK href=\"..\CSS\CPP.css\" type=text/css rel=stylesheet>

<TABLE id=Table1 style=\"Z-INDEX: 101; LEFT: 8px; WIDTH: 152px; POSITION: absolute; TOP: 2px; HEIGHT: 106.05%\" cellSpacing=0 cellPadding=0 width=152 align=left border=0>

<TBODY>

<TR>

<TD vAlign=top width=141>

<TABLE id=Table2 cellSpacing=0 cellPadding=0 width=\"100%\" border=0>

<TBODY>

<TR>

<TD height=30> </TD></TR>

<TR>

<TD vAlign=top align=left height=108><IMG id=contentContainer1_ctl00_Welcome1_Image1 style=\"BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px\" src=\"Images/Company_Logo.gif\"><A href=\"WelcomeSadmin.htm\" target=mainFrame></A></TD></TR></TBODY></TABLE>

<TABLE id=Table3 cellSpacing=0 cellPadding=0 width=\"100%\" border=0>

<TBODY>

<TR>

<TD align=right>

<DIV id=contentContainer1_ctl00_Welcome1_cppcomboLanguage_pnlMain><LINK href=\"../CSS/CPP.css\" type=text/css rel=stylesheet><SELECT class=FormComponents id=contentContainer1_ctl00_Welcome1_cppcomboLanguage_objDDList style=\"WIDTH: 130px\" onchange=\"javascript:setTimeout('__doPostBack(\'contentContainer1$ctl00$Welcome1$cppcomboLanguage$objDDList\',\'\')', 0)\" name=contentContainer1$ctl00$Welcome1$cppcomboLanguage$objDDList> <OPTION value=\"Select Language\" selected>Select Language</OPTION> <OPTION value=1>English</OPTION></SELECT> </DIV></TD>

<TD> </TD></TR>

<TR>

<TD> </TD>

<TD> </TD></TR>

<TR>

<TD>

<TD></TD></TR></TBODY></TABLE></TD>

<TD width=10> </TD>

<TD vAlign=top width=1 background=imagesred.gif bgColor=#ed252a><IMG height=1 src=\"images/red.gif\" width=1></TD>

<TD width=10> </TD></TR></TBODY></TABLE></DIV>

<P></P>

<P align=left> </P></TD>

<TD>

<P>

<TABLE id=Table6 style=\"HEIGHT: 0.1%\" cellSpacing=1 cellPadding=1 width=\"100%\" align=left border=0>

<TBODY>

<TR>

<TD colSpan=2>

<P align=right>

<DIV id=contentContainer1_ctl00_Toolbar1_pnlMain><LINK href=\"..\CSS\CPP.css\" type=text/css rel=stylesheet>

<P>

<TABLE id=Table1 cellSpacing=0 cellPadding=0 width=609 border=0>

<TBODY>

<TR>

<TD width=956>

<P align=right>

<DIV id=contentContainer1_ctl00_Toolbar1_cmdBarLogin_pnlMain>

<DIV id=PT_dTooltip></DIV>

<TABLE height=\"100%\" cellSpacing=1 cellPadding=1 width=\"100%\" border=0>

<TBODY>

<TR>

<TD vAlign=top align=right height=24>

<TABLE height=24 cellSpacing=1 cellPadding=1 border=0>

<TBODY>

<TR vAlign=top>

<TD><A style=\"CURSOR: hand\" onclick=javascript:Helpdesk();><IMG alt=Helpdesk src=\"images/Helpdesk.gif\" border=0 name=imgHelpdesk></A></TD></TR></TBODY></TABLE></TD></TR>

<TR>

<TD vAlign=top align=right height=1></TD></TR></TBODY></TABLE></DIV>

<P></P></TD></TR></TBODY></TABLE></P></DIV>

<P></P></TD></TR>

<TR>

<TD colSpan=2>

<P align=left>

<DIV id=contentContainer1_ctl00_Region1_region1>

<DIV id=contentContainer1_ctl00_Region1_Login1_pnlMain>

<TABLE style=\"LEFT: 155px; WIDTH: 609px; POSITION: absolute; HEIGHT: 420px\" cellSpacing=0 cellPadding=0 width=609 align=left border=0>

<TBODY>

<TR>

<TD style=\"HEIGHT: 26px\" height=26> </TD></TR>

<TR>

<TD style=\"WIDTH: 501px\" vAlign=top>

<TABLE cellSpacing=0 cellPadding=0 width=\"609%\" border=0>

<TBODY>

<TR>

<TD style=\"HEIGHT: 58px\" height=58> </TD></TR>

<TR>

<TD>

<TABLE cellSpacing=0 cellPadding=0 width=\"100%\" align=center>

<TBODY>

<TR>

<TD style=\"WIDTH: 304px; HEIGHT: 207px\" vAlign=top align=right width=304>

<OBJECT codeBase=https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0 height=208 width=262 classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000><PARAM NAME=\"_cx\" VALUE=\"6932\"><PARAM NAME=\"_cy\" VALUE=\"5503\"><PARAM NAME=\"FlashVars\" VALUE=\"\"><PARAM NAME=\"Movie\" VALUE=\"images/home_movie.swf\"><PARAM NAME=\"Src\" VALUE=\"images/home_movie.swf\"><PARAM NAME=\"WMode\" VALUE=\"Window\"><PARAM NAME=\"Play\" VALUE=\"-1\"><PARAM NAME=\"Loop\" VALUE=\"-1\"><PARAM NAME=\"Quality\" VALUE=\"High\"><PARAM NAME=\"SAlign\" VALUE=\"LT\"><PARAM NAME=\"Menu\" VALUE=\"0\"><PARAM NAME=\"Base\" VALUE=\"\"><PARAM NAME=\"AllowScriptAccess\" VALUE=\"always\"><PARAM NAME=\"Scale\" VALUE=\"NoScale\"><PARAM NAME=\"DeviceFont\" VALUE=\"0\"><PARAM NAME=\"EmbedMovie\" VALUE=\"0\"><PARAM NAME=\"BGColor\" VALUE=\"\"><PARAM NAME=\"SWRemote\" VALUE=\"\"><PARAM NAME=\"MovieData\" VALUE=\"\"><PARAM NAME=\"SeamlessTabbing\" VALUE=\"1\"><PARAM NAME=\"Profile\" VALUE=\"0\"><PARAM NAME=\"ProfileAddress\" VA

LUE=\"\"><PARAM NAME=\"ProfilePort\" VALUE=\"0\"><PARAM NAME=\"AllowNetworking\" VALUE=\"all\">

<embed src=\"../Images/home_movie.swf\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\"

width=\"262\" height=\"208px\"> </embed> </OBJECT></TD>

<TD style=\"HEIGHT: 207px\" vAlign=top bgColor=#eeeeee><FORM method=\"post\" action=\"\" name=\"form1\">

<TABLE cellSpacing=0 cellPadding=0 width=\"100%\" border=0>

<TBODY>

<TR>

<TD class=redtext style=\"WIDTH: 164px; HEIGHT: 19px\"> <IMG height=8 src=\"../Images/Icon_Login.gif\"> <SPAN id=contentContainer1_ctl00_Region1_Login1_loglblLogin style=\"DISPLAY: inline-block; WIDTH: 112px\">Login</SPAN></TD></TR>

<TR>

<TD style=\"WIDTH: 164px\" height=8></TD>

<TD></TD></TR></TBODY></TABLE>

<TABLE cellSpacing=2 cellPadding=2 width=\"100%\" border=0>

<TBODY>

<TR>

<TD style=\"WIDTH: 2px; HEIGHT: 28px\" width=2> </TD>

<TD class=GreyText1 style=\"WIDTH: 93px; HEIGHT: 28px\" align=right width=93><SPAN id=contentContainer1_ctl00_Region1_Login1_loglblDisplayLogin style=\"DISPLAY: inline-block; WIDTH: 80px\">Login</SPAN></TD>

<TD class=GreyText1 style=\"WIDTH: 128px; HEIGHT: 28px\" align=right width=128>

<P align=left><INPUT class=inputText id=contentContainer1_ctl00_Region1_Login1_txtUserName style=\"WIDTH: 144px; BORDER-TOP-STYLE: groove; BORDER-RIGHT-STYLE: groove; BORDER-LEFT-STYLE: groove; HEIGHT: 24px; BORDER-BOTTOM-STYLE: groove\" name=contentContainer1$ctl00$Region1$Login1$txtUserName></P></TD>

<TD class=GreyText1 style=\"HEIGHT: 28px\"> </TD></TR>

<TR>

<TD style=\"WIDTH: 2px\" height=8></TD>

<TD style=\"WIDTH: 93px\">

<TD style=\"WIDTH: 128px\"></TD>

<TD></TD></TR>

<TR>

<TD style=\"WIDTH: 2px\"> </TD>

<TD class=GreyText1 style=\"WIDTH: 93px\" align=right><SPAN id=contentContainer1_ctl00_Region1_Login1_loglblPassword style=\"DISPLAY: inline-block; WIDTH: 80px\">Password</SPAN></TD>

<TD class=GreyText1 style=\"WIDTH: 128px\" align=right>

<P align=left><INPUT class=inputText id=contentContainer1_ctl00_Region1_Login1_txtPassword style=\"WIDTH: 144px; BORDER-TOP-STYLE: groove; BORDER-RIGHT-STYLE: groove; BORDER-LEFT-STYLE: groove; HEIGHT: 24px; BORDER-BOTTOM-STYLE: groove\" type=password maxLength=25 value=\"\" name=contentContainer1$ctl00$Region1$Login1$txtPassword></P></TD>

<TD class=GreyText1><INPUT id=contentContainer1_ctl00_Region1_Login1_imgbttnSubmit style=\"BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px\" onclick=\"if (typeof(Page_ClientValidate) == 'function') Page_ClientValidate();\" type=image src=\"Images/Submit.gif\" name=contentContainer1$ctl00$Region1$Login1$imgbttnSubmit></TD></TR>

<TR>

<TD style=\"WIDTH: 2px\"> </TD>

<TD style=\"WIDTH: 93px\"> </TD>

<TD class=RedText style=\"WIDTH: 128px\" align=right>

<P class=GreyText0 align=left><A class=HlinkText id=contentContainer1_ctl00_Region1_Login1_loglnkbttnForgotPassword style=\"DISPLAY: inline-block; WIDTH: 136px\" href=\"javascript:__doPostBack('contentContainer1$ctl00$Region1$Login1$loglnkbttnForgotPassword','')\">Forgot Password</A><A class=GreyText1 href=\"ForgotPassword.aspx\" target=\"\"></A></P></TD>

<TD> </TD></TR></TBODY></TABLE></FORM></TD></TR></TBODY></TABLE></TD></TR>

<TR>

<TD style=\"HEIGHT: 54px\" height=54> </TD></TR></TBODY></TABLE>

<TABLE id=Table1 cellSpacing=0 cellPadding=0 width=609 border=0>

<TBODY>

<TR>

<TD class=GreyText1 align=middle bgColor=#eeeeee height=24><SPAN id=contentContainer1_ctl00_Region1_Login1_loglblCopyright style=\"DISPLAY: inline-block; WIDTH: 383px\">Copyright ? Canon 2005. Best viewed in IE 6.0 and above</SPAN> <A id=contentContainer1_ctl00_Region1_Login1_loglblDownload style=\"DISPLAY: inline-block; WIDTH: 147px\" href=\"javascript:__doPostBack('contentContainer1$ctl00$Region1$Login1$loglblDownload','')\">Download IE 6.0</A></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></DIV></DIV>

<P></P></TD></TR>

<TR></TR></TBODY></TABLE></P></TD></TR></TBODY></TABLE>


I recommend you to remove the updatepanels, and validate your page. The above innerHTML value is definitely not a valid HTML content (for example multiple "Table1" values for id, using deprecated attributes etc.). When your page is validated againts some doctype (HTML 4.0 or XHTML 1.0) try again the updatepanel. Maybe this helps.


sorry, I am unable to get this.

How can i replace asp:UpdatePanel because without this how i will be able to update the page asyn.

Please make it more with some example ,if possible


I recommend to remove the updatepanels only because it help to validate your page. "Simply" comment out the updatepanel controls in the aspx file, and also comment out any updatepanel's related code in the code behind file. Then your page should work in the normal "old" way. Play with the page (try pushing your buttons etc.), and validateeachtime. Probably you will get some validation errors.

The easiest way (for me) to validate my pages in the browser (not in visual studio ide!), using firefox with the "web developer" add-in, there is also a similar add-in for ie. Or you can go to http://validator.w3.org/ directly.

At least incorrectly nested elements (if you have this error), and double ids (I think you have this error) should be corrected some way.

After you corrected the errors, "put back" the updatepanel and try again.

No comments:

Post a Comment