📄 ivan porto carrero - make the freetextbox work inside an atlas updatpanel.htm
字号:
href="http://www.syringe.net.nz/">Syringe.Net.Nz</A></TD></TR>
<TR>
<TD class=blogRollCellStyle><A class=blogRollXmlLinkStyle
href="http://www.fastchicken.co.nz/blog/SyndicationService.asmx/GetRss"><IMG
src="Ivan Porto Carrero - Make the freetextbox work inside an atlas updatpanel.files/feedButton.gif"
border=0></A> <A class=blogRollLinkStyle
href="http://www.fastchicken.co.nz/blog/rss.xml">The Chicken
Coop</A></TD></TR>
<TR>
<TD class=blogRollCellStyle><A class=blogRollXmlLinkStyle
href="http://www.thejoyofcode.com/Feed.ashx?feed=RSS_2-0"><IMG
src="Ivan Porto Carrero - Make the freetextbox work inside an atlas updatpanel.files/feedButton.gif"
border=0></A> <A class=blogRollLinkStyle
href="http://www.thejoyofcode.com/">the Joy of Code</A></TD></TR>
<TR>
<TD class=blogRollCellStyle><A class=blogRollXmlLinkStyle
href="http://ims.co.nz/blog/rss.aspx"><IMG
src="Ivan Porto Carrero - Make the freetextbox work inside an atlas updatpanel.files/feedButton.gif"
border=0></A> <A class=blogRollLinkStyle
href="http://ims.co.nz/blogl">Tim
Haines</A></TD></TR></TBODY></TABLE></DIV></DIV></DIV>
<H2 class=sidetitle align=center>Blog Feeds</H2>
<DIV class=side align=center>
<DIV align=left><A class=rssLinkStyle
href="http://feeds.feedburner.com/casualjim"><IMG class=rssLinkImageStyle
title="RSS 2.0" alt="RSS 2.0"
src="Ivan Porto Carrero - Make the freetextbox work inside an atlas updatpanel.files/feed-icon-16x16.gif"
border=0></A> <A
href="http://www-106.ibm.com/developerworks/xml/library/x-rss20/">RSS 2.0</A>
<BR><A class=atomLinkStyle href="http://feeds.feedburner.com/casualjim"><IMG
class=rssLinkImageStyle title="Atom 1.0" alt="Atom 1.0"
src="Ivan Porto Carrero - Make the freetextbox work inside an atlas updatpanel.files/atomButton.gif"
border=0></A> <A href="http://www.atomenabled.org/">ATOM 1.0</A> <BR><A
class=cdfLinkStyle href="http://www.flanders.co.nz/Blog/cdf.ashx"><IMG
class=cdfLinkImageStyle title=CDF alt=CDF
src="Ivan Porto Carrero - Make the freetextbox work inside an atlas updatpanel.files/cdfButton.gif"
border=0></A> <A href="http://www.w3.org/TR/NOTE-CDFsubmit.html">Active
channel</A> <BR></DIV></DIV>
<H2 class=sidetitle align=center>Site listed on</H2>
<DIV class=side align=center>
<DIV align=center><A href="http://www.blo.gs/" target=_blank><IMG height=15
alt="Blo.gs - blog directory"
src="Ivan Porto Carrero - Make the freetextbox work inside an atlas updatpanel.files/blogs.png"
width=80 border=0></A> <BR><A href="http://weblogs.com/" target=_blank><IMG
height=15 alt=weblogs.com
src="Ivan Porto Carrero - Make the freetextbox work inside an atlas updatpanel.files/weblogs.png"
width=80 border=0></A> <BR><A href="http://www.technorati.com/claim/gw6vhrb4gs"
rel=me><IMG height=15 alt="me technorati"
src="Ivan Porto Carrero - Make the freetextbox work inside an atlas updatpanel.files/technorati.png"
width=80 border=0></A> </DIV></DIV>
<H2 class=sidetitle align=center>Disclaimer</H2>
<DIV class=side align=center><FONT color=#993300>
<P><B>Disclaimer</B><BR>The opinions expressed herein are my own personal
opinions and do not represent my employer's view in anyway.</P></FONT></DIV>
<H2 class=sidetitle align=center>Contact</H2>
<DIV class=side align=center>
<DIV align=center><A href="mailto:koolkraftATGMailDotCom"><IMG alt="Mail Me"
src="Ivan Porto Carrero - Make the freetextbox work inside an atlas updatpanel.files/gmailme.gif"
border=0></A> <BR></DIV></DIV>
<H2 class=sidetitle align=center>Login</H2>
<DIV class=side align=center><A
href="http://www.flanders.co.nz/Blog/Login.aspx">Sign In</A>
</DIV><BR><BR><BR></DIV>
<DIV id=content>
<DIV class=blogbody>
<DIV class=date><A class=archiveLinkStyle
href="http://www.flanders.co.nz/Blog/default,date,2006-07-22.aspx"><IMG
class=archiveLinkImageStyle
src="Ivan Porto Carrero - Make the freetextbox work inside an atlas updatpanel.files/dayLink.gif"
border=0></A> 2006年7月22日</DIV>
<DIV class=body><A name=a12204738-6e52-4540-9a79-505ef8ff53fa></A>
<TABLE id=blogentry cellPadding=1 width="100%">
<TBODY>
<TR>
<TD vAlign=top><B><A class=TitleLinkStyle
href="http://www.flanders.co.nz/Blog/2006/07/21/MakeTheFreetextboxWorkInsideAnAtlasUpdatpanel.aspx"
rel=bookmark>Make the freetextbox work inside an atlas
updatpanel</A></B><BR>
<P>A while ago I blogged about <A class=""
title="Get the freetextbox going in an updatepanel"
href="http://www.flanders.co.nz/Blog/ct.ashx?id=12204738-6e52-4540-9a79-505ef8ff53fa&url=http%3a%2f%2fwww.flanders.co.nz%2fBlog%2f2006%2f05%2f22%2fATLASContinuedGetTheFreetextboxGoing.aspx"
target="" ?>making the freetextbox work inside an updatepanel</A>. I
didn't put the code at that time because it wasn't what it should be.</P>
<P>For the NBlogr engine I do need a working version of that control. And
it should work on firefox and internet explorer. Now I have it somewhat
working. I thought it would be best to share this, as I'm sure that
there are others that are facing the same problem.</P>
<P>You basically wrap it in an iframe so that it loads it's script in a
page that does not have an update panel on it.<BR>through javascript you
get the value of the entered in the freetextbox and set it in an
hiddenfield. and voila you're done.</P>
<P>FreeTextBoxWrapper.ascx :</P><FONT color=#0000ff size=2>
<P><</P></FONT><FONT color=#800000 size=2>iframe</FONT> <FONT
color=#000000 size=2></FONT><FONT color=#ff0000 size=2>runat</FONT> <FONT
color=#0000ff size=2>="server"</FONT> <FONT color=#000000
size=2></FONT><FONT color=#ff0000 size=2>id</FONT> <FONT color=#0000ff
size=2>="ifrmTxt"</FONT> <FONT color=#000000 size=2></FONT><FONT
color=#ff0000 size=2>width</FONT> <FONT color=#0000ff size=2>="600"</FONT>
<FONT color=#000000 size=2></FONT><FONT color=#ff0000 size=2>height</FONT>
<FONT color=#0000ff size=2>="400"</FONT> <FONT color=#000000
size=2></FONT><FONT color=#ff0000 size=2>frameborder</FONT> <FONT
color=#0000ff size=2>="0"</FONT> <FONT color=#000000 size=2></FONT><FONT
color=#0000ff size=2>></</FONT> <FONT color=#800000
size=2>iframe</FONT> <FONT color=#0000ff size=2>>
<P><</P></FONT><FONT color=#800000 size=2>asp</FONT> <FONT
color=#0000ff size=2>:</FONT> <FONT color=#800000
size=2>HiddenField</FONT> <FONT color=#000000 size=2></FONT><FONT
color=#ff0000 size=2>ID</FONT> <FONT color=#0000ff
size=2>="hfFtbValue"</FONT> <FONT color=#000000 size=2></FONT><FONT
color=#ff0000 size=2>runat</FONT> <FONT color=#0000ff
size=2>="server"</FONT> <FONT color=#000000 size=2></FONT><FONT
color=#0000ff size=2>/></FONT>
<P>And the codebehind for the ascx :</P><FONT color=#0000ff size=2>
<DIV
style="FONT-SIZE: 10pt; BACKGROUND: #ffffcc; COLOR: black; FONT-FAMILY: Consolas">
<P style="MARGIN: 0px"><SPAN
style="COLOR: #2b91af"> 12</SPAN> <SPAN
style="BACKGROUND: white">[</SPAN><SPAN
style="BACKGROUND: white; COLOR: teal">ValidationProperty</SPAN><SPAN
style="BACKGROUND: white">(</SPAN><SPAN
style="BACKGROUND: white; COLOR: maroon">"Text"</SPAN><SPAN
style="BACKGROUND: white">)]</SPAN></P>
<P style="MARGIN: 0px"><SPAN
style="COLOR: #2b91af"> 13</SPAN> <SPAN
style="BACKGROUND: white; COLOR: blue">public</SPAN><SPAN
style="BACKGROUND: white"></SPAN><SPAN
style="BACKGROUND: white; COLOR: blue">partial</SPAN><SPAN
style="BACKGROUND: white"></SPAN><SPAN
style="BACKGROUND: white; COLOR: blue">class</SPAN><SPAN
style="BACKGROUND: white"></SPAN><SPAN
style="BACKGROUND: white; COLOR: teal">App_Components_FreeTextBoxWrapper</SPAN><SPAN
style="BACKGROUND: white"> : </SPAN><SPAN
style="BACKGROUND: white; COLOR: navy">System</SPAN><SPAN
style="BACKGROUND: white">.</SPAN><SPAN
style="BACKGROUND: white; COLOR: navy">Web</SPAN><SPAN
style="BACKGROUND: white">.</SPAN><SPAN
style="BACKGROUND: white; COLOR: navy">UI</SPAN><SPAN
style="BACKGROUND: white">.</SPAN><SPAN
style="BACKGROUND: white; COLOR: teal">UserControl</SPAN></P>
<P style="MARGIN: 0px"><SPAN
style="COLOR: #2b91af"> 14</SPAN> <SPAN
style="BACKGROUND: white">{</SPAN></P>
<P style="MARGIN: 0px"><SPAN
style="COLOR: #2b91af"> 15</SPAN> <SPAN
style="BACKGROUND: white"> </SPAN><SPAN
style="BACKGROUND: white; COLOR: blue">public</SPAN><SPAN
style="BACKGROUND: white"></SPAN><SPAN
style="BACKGROUND: white; COLOR: blue">string</SPAN><SPAN
style="BACKGROUND: white"></SPAN><SPAN
style="BACKGROUND: white; COLOR: navy">Text</SPAN></P>
<P style="MARGIN: 0px"><SPAN
style="COLOR: #2b91af"> 16</SPAN> <SPAN
style="BACKGROUND: white"> {</SPAN></P>
<P style="MARGIN: 0px"><SPAN
style="COLOR: #2b91af"> 17</SPAN> <SPAN
style="BACKGROUND: white">
</SPAN><SPAN style="BACKGROUND: white; COLOR: blue">get</SPAN></P>
<P style="MARGIN: 0px"><SPAN
style="COLOR: #2b91af"> 18</SPAN> <SPAN
style="BACKGROUND: white">
{</SPAN></P>
<P style="MARGIN: 0px"><SPAN
style="COLOR: #2b91af"> 19</SPAN> <SPAN
style="BACKGROUND: white">
</SPAN><SPAN
style="BACKGROUND: white; COLOR: blue">return</SPAN><SPAN
style="BACKGROUND: white"></SPAN><SPAN
style="BACKGROUND: white; COLOR: navy">hfFtbValue</SPAN><SPAN
style="BACKGROUND: white">.</SPAN><SPAN
style="BACKGROUND: white; COLOR: navy">Value</SPAN><SPAN
style="BACKGROUND: white">;</SPAN></P>
<P style="MARGIN: 0px"><SPAN
style="COLOR: #2b91af"> 20</SPAN> <SPAN
style="BACKGROUND: white">
}</SPAN></P>
<P style="MARGIN: 0px"><SPAN
style="COLOR: #2b91af"> 21</SPAN> <SPAN
style="BACKGROUND: white">
</SPAN><SPAN style="BACKGROUND: white; COLOR: blue">set</SPAN></P>
<P style="MARGIN: 0px"><SPAN
style="COLOR: #2b91af"> 22</SPAN> <SPAN
style="BACKGROUND: white">
{</SPAN></P>
<P style="MARGIN: 0px"><SPAN
style="COLOR: #2b91af"> 23</SPAN> <SPAN
style="BACKGROUND: white">
</SPAN><SPAN
style="BACKGROUND: white; COLOR: navy">hfFtbValue</SPAN><SPAN
style="BACKGROUND: white">.</SPAN><SPAN
style="BACKGROUND: white; COLOR: navy">Value</SPAN><SPAN
style="BACKGROUND: white"> = </SPAN><SPAN
style="BACKGROUND: white; COLOR: blue">value</SPAN><SPAN
style="BACKGROUND: white">;</SPAN></P>
<P style="MARGIN: 0px"><SPAN
style="COLOR: #2b91af"> 24</SPAN> <SPAN
style="BACKGROUND: white">
}</SPAN></P>
<P style="MARGIN: 0px"><SPAN
style="COLOR: #2b91af"> 25</SPAN> <SPAN
style="BACKGROUND: white"> }</SPAN></P>
<P style="MARGIN: 0px"><SPAN
style="COLOR: #2b91af"> 26</SPAN> <SPAN
style="BACKGROUND: white"> </SPAN><SPAN
style="BACKGROUND: white; COLOR: blue">public</SPAN><SPAN
style="BACKGROUND: white"></SPAN><SPAN
style="BACKGROUND: white; COLOR: blue">string</SPAN><SPAN
style="BACKGROUND: white"></SPAN><SPAN
style="BACKGROUND: white; COLOR: navy">Width</SPAN></P>
<P style="MARGIN: 0px"><SPAN
style="COLOR: #2b91af"> 27</SPAN> <SPAN
style="BACKGROUND: white"> {</SPAN></P>
<P style="MARGIN: 0px"><SPAN
style="COLOR: #2b91af"> 28</SPAN> <SPAN
style="BACKGROUND: white">
</SPAN><SPAN style="BACKGROUND: white; COLOR: blue">get</SPAN></P>
<P style="MARGIN: 0px"><SPAN
style="COLOR: #2b91af"> 29</SPAN> <SPAN
style="BACKGROUND: white">
{</SPAN></P>
<P style="MARGIN: 0px"><SPAN
style="COLOR: #2b91af"> 30</SPAN> <SPAN
style="BACKGROUND: white">
</SPAN><SPAN
style="BACKGROUND: white; COLOR: blue">return</SPAN><SPAN
style="BACKGROUND: white"></SPAN><SPAN
style="BACKGROUND: white; COLOR: navy">ifrmTxt</SPAN><SPAN
style="BACKGROUND: white">.</SPAN><SPAN
style="BACKGROUND: white; COLOR: navy">Attributes</SPAN><SPAN
style="BACKGROUND: white">[</SPAN><SPAN
style="BACKGROUND: white; COLOR: maroon">"width"</SPAN><SPAN
style="BACKGROUND: white">];</SPAN></P>
<P style="MARGIN: 0px"><SPAN
style="COLOR: #2b91af"> 31</SPAN> <SPAN
style="BACKGROUND: white">
}</SPAN></P>
<P style="MARGIN: 0px"><SPAN
style="COLOR: #2b91af"> 32</SPAN> <SPAN
style="BACKGROUND: white">
</SPAN><SPAN style="BACKGROUND: white; COLOR: blue">set</SPAN></P>
<P style="MARGIN: 0px"><SPAN
style="COLOR: #2b91af"> 33</SPAN> <SPAN
style="BACKGROUND: white">
{</SPAN></P>
<P style="MARGIN: 0px"><SPAN
style="COLOR: #2b91af"> 34</SPAN> <SPAN
style="BACKGROUND: white">
</SPAN><SPAN
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -