<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-4892576122733604611</id><updated>2025-05-22T04:15:58.744-03:00</updated><category term=".NET"/><category term="SQL"/><category term="Ajax"/><category term="Arquitetura Informação"/><category term="JavaScript"/><category term="Arquitetura Software"/><category term="Controles Personalizados"/><category term="Gerar Imagem"/><category term="Stored Procedure"/><category term="User Experience"/><category term=".NET Visual Studio 2008"/><category term="C Language"/><category term="Electronics"/><category term="Envio de e-mail"/><category term="Facebook"/><category term="Google API"/><category term="Hardware"/><category term="IIS"/><category term="Oracle"/><category term="Produtividade"/><category term="Publicidade Online"/><category term="Rede Social"/><category term="SQLEXPRESS"/><category term="Software"/><category term="Validações"/><category term="Visual SourceSafe"/><category term="Visual Studio"/><category term="Windows Forms"/><title type='text'>Édipo Oliveira - ASP.NET, C#, Microsoft e tecnologia</title><subtitle type='html'>Blog com dicas úteis e práticas para soluções de problemas enfrentados durante o desenvolvimento de software. Blog focado em ASP.NET, C# e notícias sobre tecnologia.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://edipooliveira.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4892576122733604611/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://edipooliveira.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/4892576122733604611/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/06382455493229615250</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>67</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4892576122733604611.post-3404982528724900758</id><published>2014-11-08T17:24:00.000-02:00</published><updated>2014-11-08T17:24:56.934-02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Oracle"/><title type='text'>Criando Sequence no Oracle</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Como criar Sequence no Oracle de forma &quot;automática&quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;declare&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp; cnt number;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;begin&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp; for r in (select SEQUENCE_NAME from all_sequences where sequence_owner = &#39;DATABASE&#39;) loop&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; dbms_output.put_line(&#39;drop sequence &#39; || r.Sequence_name || &#39; ;&#39;);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp; end loop;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;end;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;declare&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp; cnt number;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;begin&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp; for r in (select table_name from all_tables &amp;nbsp;where owner = &#39;DATABASE&#39; and SUBSTR(table_name,0,2) &amp;lt;&amp;gt; &#39;DM&#39;) loop&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; dbms_output.put_line(&#39;create sequence sec_&#39; || SUBSTR(r.table_name,0,26) || &#39; minvalue 1 maxvalue 9999999999 start with 1 increment by 1 nocache cycle;&#39;);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp; end loop;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;end;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;Fonte: Rodrigo Araujo&lt;/i&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://edipooliveira.blogspot.com/feeds/3404982528724900758/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://edipooliveira.blogspot.com/2014/11/criando-sequence-no-oracle.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4892576122733604611/posts/default/3404982528724900758'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4892576122733604611/posts/default/3404982528724900758'/><link rel='alternate' type='text/html' href='http://edipooliveira.blogspot.com/2014/11/criando-sequence-no-oracle.html' title='Criando Sequence no Oracle'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/06382455493229615250</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4892576122733604611.post-8890798637617003290</id><published>2014-11-02T12:59:00.001-02:00</published><updated>2014-11-02T12:59:56.392-02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term=".NET"/><category scheme="http://www.blogger.com/atom/ns#" term="IIS"/><title type='text'>Como gerenciar o IIS por programação?</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Aqui está um trecho de código que irá guiá-lo criando o objeto DirectoryEntry e chamar o método Invoke (...) com o parâmetro adequado para fazer a operação específica com o pool de aplicativos do IIS:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;const string APPLICATION_POOL_URL = &quot;IIS://KUNAL-CHOWDHURY.COM/W3SVC/AppPools/BlogPool&quot;;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;var directoryEntry = new DirectoryEntry(APPLICATION_POOL_URL, USERNAME, PASSWORD);&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;// call to stop the Application Pool&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;directoryEntry.Invoke(&quot;Stop&quot;, null);&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;// call to start the Application Pool&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;directoryEntry.Invoke(&quot;Start&quot;, null);&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;// call to recycle the Application Pool&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;directoryEntry.Invoke(&quot;Recycle&quot;, null);&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;Fonte:&amp;nbsp;&lt;a href=&quot;http://www.kunal-chowdhury.com/2013/08/how-to-manage-iis-application-pool.html&quot;&gt;http://www.kunal-chowdhury.com/2013/08/how-to-manage-iis-application-pool.html&lt;/a&gt;&lt;/i&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://edipooliveira.blogspot.com/feeds/8890798637617003290/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://edipooliveira.blogspot.com/2014/11/como-gerenciar-o-iis-por-programacao.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4892576122733604611/posts/default/8890798637617003290'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4892576122733604611/posts/default/8890798637617003290'/><link rel='alternate' type='text/html' href='http://edipooliveira.blogspot.com/2014/11/como-gerenciar-o-iis-por-programacao.html' title='Como gerenciar o IIS por programação?'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/06382455493229615250</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4892576122733604611.post-1104415245736982436</id><published>2014-10-26T19:29:00.000-02:00</published><updated>2014-10-26T19:29:10.860-02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term=".NET"/><category scheme="http://www.blogger.com/atom/ns#" term="Windows Forms"/><title type='text'>Abrindo arquivo no Windows Forms</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Para abrir um arquivo no windows forms.&lt;br /&gt;
&lt;br /&gt;
String caminhoArquivoPDF = String.Format(“{0}\\Ajuda\\{1}”, Application.StartupPath, “ajuda.pdf”&lt;br /&gt;
);&lt;br /&gt;
&lt;br /&gt;
if (File.Exists(caminhoArquivoPDF))&lt;br /&gt;
System.Diagnostics.Process.Start(caminhoArquivoPDF);&lt;br /&gt;
&lt;br /&gt;
Lembrando que no modo debug não ira funcionar somente quando estiver publicado. Isso ocorre por causa do caminho do arquivo.&lt;br /&gt;
&lt;br /&gt;
Para colocar o arquivo você terá que adicionar normalmente mas depois fazer o seguinte :&lt;br /&gt;
&lt;br /&gt;
Nas propriedades do arquivo, mude o Build Action para “Content”;&lt;br /&gt;
Pronto! O arquivo vai aparecer em “Application Files” na configuração do ClickOnce&lt;br /&gt;
&lt;br /&gt;
Sem isso o arquivo não ira aprecer no   “Application Files”  e  não vai funcionar.&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://edipooliveira.blogspot.com/feeds/1104415245736982436/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://edipooliveira.blogspot.com/2014/10/abrindo-arquivo-no-windows-forms.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4892576122733604611/posts/default/1104415245736982436'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4892576122733604611/posts/default/1104415245736982436'/><link rel='alternate' type='text/html' href='http://edipooliveira.blogspot.com/2014/10/abrindo-arquivo-no-windows-forms.html' title='Abrindo arquivo no Windows Forms'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/06382455493229615250</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4892576122733604611.post-454984966095100857</id><published>2014-10-10T08:21:00.000-03:00</published><updated>2014-11-24T11:18:40.836-02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term=".NET"/><title type='text'>O novo e melhorado C# 6.0 </title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
A versão 6.0 do C# passou por muitas melhorias e aprimoramentos no decorrer do seu desenvolvimento. Aqui está um resumo completo sobre o que esperar e do que procurar de novidades.&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://msdn.microsoft.com/en-us/magazine/dn802602.aspx&quot;&gt;http://msdn.microsoft.com/en-us/magazine/dn802602.aspx&lt;/a&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://edipooliveira.blogspot.com/feeds/454984966095100857/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://edipooliveira.blogspot.com/2014/10/o-novo-e-melhorado-c-60.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4892576122733604611/posts/default/454984966095100857'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4892576122733604611/posts/default/454984966095100857'/><link rel='alternate' type='text/html' href='http://edipooliveira.blogspot.com/2014/10/o-novo-e-melhorado-c-60.html' title='O novo e melhorado C# 6.0 '/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/06382455493229615250</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4892576122733604611.post-1154949537841355102</id><published>2014-10-09T23:40:00.000-03:00</published><updated>2014-11-24T11:19:16.547-02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Visual Studio"/><title type='text'>Visual Studio - Productivity Power Tools</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Ótima ferramenta/plugin para melhorar a produtividade no Visual Studio.&lt;br /&gt;
&lt;br /&gt;
VS 2010&lt;br /&gt;
&lt;a href=&quot;http://visualstudiogallery.msdn.microsoft.com/d0d33361-18e2-46c0-8ff2-4adea1e34fef?SRC=VSIDE&quot;&gt;http://visualstudiogallery.msdn.microsoft.com/d0d33361-18e2-46c0-8ff2-4adea1e34fef?SRC=VSIDE&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
VS 2012&lt;br /&gt;
&lt;a href=&quot;http://visualstudiogallery.msdn.microsoft.com/3a96a4dc-ba9c-4589-92c5-640e07332afd&quot;&gt;http://visualstudiogallery.msdn.microsoft.com/3a96a4dc-ba9c-4589-92c5-640e07332afd&lt;/a&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://edipooliveira.blogspot.com/feeds/1154949537841355102/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://edipooliveira.blogspot.com/2014/10/visual-studio-productivity-power-tools.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4892576122733604611/posts/default/1154949537841355102'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4892576122733604611/posts/default/1154949537841355102'/><link rel='alternate' type='text/html' href='http://edipooliveira.blogspot.com/2014/10/visual-studio-productivity-power-tools.html' title='Visual Studio - Productivity Power Tools'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/06382455493229615250</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4892576122733604611.post-1552308064125597955</id><published>2014-10-09T23:32:00.000-03:00</published><updated>2014-10-09T23:32:42.838-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term=".NET"/><title type='text'>Problemas no UpdatePanel com o IE10 - __dopostback is undefined</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
ASP.NET pode não reconhecer as versões mais recentes de alguns navegadores, e, consequentemente, tratá-los como navegadores antigos. (Basicamente: no JavaScript.)&lt;br /&gt;
A correção é fazer com que os arquivos de definição do navegador sejam atualizados.&lt;br /&gt;
Você pode instalar uma correção para todo o servidor ou apenas corrigir projetos individuais.&lt;br /&gt;
Hotfixes são disponíveis nos links abaixo para download.&lt;br /&gt;
NET 4 - http://support.microsoft.com/kb/2600088&lt;br /&gt;
NET 2.0 - http://support.microsoft.com/kb/2600100&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;Fonte:&amp;nbsp;http://goo.gl/qU9I9t&lt;/i&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://edipooliveira.blogspot.com/feeds/1552308064125597955/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://edipooliveira.blogspot.com/2014/10/problemas-no-updatepanel-com-o-ie10.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4892576122733604611/posts/default/1552308064125597955'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4892576122733604611/posts/default/1552308064125597955'/><link rel='alternate' type='text/html' href='http://edipooliveira.blogspot.com/2014/10/problemas-no-updatepanel-com-o-ie10.html' title='Problemas no UpdatePanel com o IE10 - __dopostback is undefined'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/06382455493229615250</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4892576122733604611.post-5457315675016351855</id><published>2014-06-15T21:02:00.001-03:00</published><updated>2014-06-15T21:04:25.805-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="C Language"/><category scheme="http://www.blogger.com/atom/ns#" term="Electronics"/><category scheme="http://www.blogger.com/atom/ns#" term="Hardware"/><title type='text'>PC-Driven LED Display</title><content type='html'>&lt;p&gt;Here is a circuit to generate sequentially running light effects using a simple program written in C. &lt;br&gt;The output of the program is taken from the LPT port of a PC and then fed to the interfacing circuit for the LED display. &lt;br&gt;The outputs of the interfacing circuit are decoded, inverted, and then connected to LEDs through optocouplers.&lt;/p&gt; &lt;p&gt;Aqui está um circuito para gerar sequencialmente efeitos de luz usando um simples programa escrito em C. &lt;br&gt;A saída do programa é feita a partir da porta LPT de um computador e, em seguida, alimentado para o circuito de interface para os LEDs. &lt;br&gt;As saídas do circuito de interface são decodificados, invertido, e depois ligado a LEDs através de optoacopladores.&lt;/p&gt; &lt;p&gt;&lt;img src=&quot;http://www.electronicsforu.com/electronicsforu/circuitarchives/my_documents/my_pictures/D9A_1.jpg&quot; width=&quot;526&quot; height=&quot;268&quot;&gt;&lt;/p&gt; &lt;p&gt;Fig. 1: Interfacing circuit for PC-driven LED display&lt;/p&gt; &lt;p&gt;The interfacing circuit along with the 25-pin parallel port is shown in Fig. 1. IC1 (74LS138) is a high-speed 1-of-8 decoder/demultiplexer. In the circuit, only five outputs (pins 10 through 14) of IC1 are used. These outputs are inverted using&amp;nbsp; NOT gate IC2 (7404). Optocouplers IC3 through IC7 (MCT2E) are used to prevent the circuit from damage in the event of short circuit in the load.&amp;nbsp; Thus the loads comprising LED blocks LB1 through LB5 are isolated from the interfacing circuit including the PC. Each LED block contains a number of LEDs connected in series.&lt;/p&gt; &lt;p&gt;The LEDs can be arranged, for instance, to display a sequential running light and fountain pot as shown in Figs 2 and 3. The colour of LED blocks can be green and red alternately.&lt;/p&gt; &lt;p&gt;&lt;img src=&quot;http://www.electronicsforu.com/electronicsforu/circuitarchives/my_documents/my_pictures/5AE_2.jpg&quot;&gt;&lt;/p&gt; &lt;p&gt;Fig. 2: LED block arrangement for sequentially running light&lt;/p&gt; &lt;p&gt;&lt;img src=&quot;http://www.electronicsforu.com/electronicsforu/circuitarchives/my_documents/my_pictures/76D_3.jpg&quot;&gt;&lt;/p&gt; &lt;p&gt;Fig. 3: LED block arrangement for fountain pot&lt;br&gt;&lt;/p&gt;  &lt;p&gt;The program can be compiled and run through Turbo C compiler. In the program, the function outport(p,x) is used, where ‘p’ is the address of the controller port and ‘x’ is the value sent to it. Here, controller port&amp;nbsp; LPT1 is used, whose base address is 378H. If LPT2 is to be used, the base address must be 278H. When the delay time delay() is increased, the running speed of LEDs decreases and vice versa.&lt;/p&gt; &lt;p&gt;In the circuit, 100-ohm fixed resistors R6 through R10 can be replaced with 100-ohm or 200-ohm presets for decreasing and increasing the intensity of LEDs.&lt;/p&gt; &lt;p&gt;The program for LED display is as follows:&lt;/p&gt; &lt;p&gt;&lt;img src=&quot;http://www.electronicsforu.com/electronicsforu/circuitarchives/my_documents/my_pictures/CZ4_table.jpg&quot;&gt;&lt;/p&gt; &lt;p&gt;This circuit costs around Rs 100.&lt;/p&gt; &lt;p&gt;&lt;em&gt;Fonte: &lt;/em&gt;&lt;a title=&quot;http://electronicsforu.com/electronicsforu/circuitarchives/view_article.asp?sno=1255&amp;amp;article_type=1&amp;amp;id=1080&amp;amp;tt=unhot&amp;amp;b_type=new#.U54n5vldV1Z&quot; href=&quot;http://electronicsforu.com/electronicsforu/circuitarchives/view_article.asp?sno=1255&amp;amp;article_type=1&amp;amp;id=1080&amp;amp;tt=unhot&amp;amp;b_type=new#.U54n5vldV1Z&quot;&gt;&lt;em&gt;http://electronicsforu.com/electronicsforu/circuitarchives/view_article.asp?sno=1255&amp;amp;article_type=1&amp;amp;id=1080&amp;amp;tt=unhot&amp;amp;b_type=new#.U54n5vldV1Z&lt;/em&gt;&lt;/a&gt;&lt;/p&gt;  </content><link rel='replies' type='application/atom+xml' href='http://edipooliveira.blogspot.com/feeds/5457315675016351855/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://edipooliveira.blogspot.com/2014/06/pc-driven-led-display.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4892576122733604611/posts/default/5457315675016351855'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4892576122733604611/posts/default/5457315675016351855'/><link rel='alternate' type='text/html' href='http://edipooliveira.blogspot.com/2014/06/pc-driven-led-display.html' title='PC-Driven LED Display'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/06382455493229615250</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4892576122733604611.post-1436053608023199764</id><published>2013-12-27T00:37:00.001-02:00</published><updated>2013-12-27T00:37:41.376-02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term=".NET"/><category scheme="http://www.blogger.com/atom/ns#" term="Produtividade"/><category scheme="http://www.blogger.com/atom/ns#" term="Software"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL"/><title type='text'>Softwares muito úteis</title><content type='html'>&lt;p&gt;Lista de softwares muito úteis para desenvolvedores e analistas de software. Lista baseada no post “&lt;em&gt;&lt;a title=&quot;Scott Hanselman&#39;s 2014 Ultimate Developer and Power Users Tool List for Windows&quot; href=&quot;http://www.hanselman.com/blog/ScottHanselmans2014UltimateDeveloperAndPowerUsersToolListForWindows.aspx&quot; target=&quot;_blank&quot;&gt;Scott Hanselman&#39;s 2014 Ultimate Developer and Power Users Tool List for Windows&lt;/a&gt;&lt;/em&gt;”&lt;/p&gt; &lt;p&gt;&lt;strong&gt;NimbleText&lt;br&gt;&lt;/strong&gt;NimbleText is a powerful tool that makes it easy to manipulate text and data.&lt;br&gt;&lt;a href=&quot;http://nimbletext.com/&quot;&gt;http://nimbletext.com/&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;AutoHotkey&lt;/strong&gt; - Automation. Hotkeys. Scripting.&lt;br&gt;Fast scriptable desktop automation with hotkeys. Creating your own apps and macros has never been easier.&lt;br&gt;&lt;a href=&quot;http://www.autohotkey.com/&quot;&gt;http://www.autohotkey.com/&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;LINQPad&lt;/strong&gt;&lt;br&gt;LINQPad lets you interactively query databases in a modern query language: LINQ.&lt;br&gt;&lt;a href=&quot;http://www.linqpad.net/&quot;&gt;http://www.linqpad.net/&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;LINQ Tools&lt;br&gt;&lt;/strong&gt;There are a number of mostly free tools that come in handy both from a usability and a learning experience.&lt;br&gt;&lt;a href=&quot;http://www.thinqlinq.com/Post.aspx/Title/LINQ-Tools&quot;&gt;http://www.thinqlinq.com/Post.aspx/Title/LINQ-Tools&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;dotPeek&lt;/strong&gt; - Free .NET Decompiler and Assembly Browser&lt;br&gt;dotPeek is a free-of-charge .NET decompiler from JetBrains, the makers of ReSharper and more developer productivity tools.&lt;br&gt;&lt;a href=&quot;http://www.jetbrains.com/decompiler/&quot;&gt;http://www.jetbrains.com/decompiler/&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Fiddler&lt;br&gt;&lt;/strong&gt;The free web debugging proxy for any browser, system or platform&lt;br&gt;&lt;a href=&quot;http://www.fiddlertool.com/&quot;&gt;http://www.fiddlertool.com/&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;WinMerge&lt;br&gt;&lt;/strong&gt;WinMerge can compare both folders and files, presenting differences in a visual text format that is easy to understand and handle.&lt;br&gt;&lt;a href=&quot;http://winmerge.org/&quot;&gt;http://winmerge.org/&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;NCrunch&lt;/strong&gt; is an automated concurrent testing tool for Visual Studio.&lt;br&gt;It intelligently runs automated tests so that you don&#39;t have to, and gives you a huge amount of useful information about your tested code, such as code coverage and performance metrics, inline in your IDE while you type.&lt;br&gt;&lt;a href=&quot;http://www.ncrunch.net/&quot;&gt;http://www.ncrunch.net/&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Query Express&lt;br&gt;&lt;/strong&gt;Query Express is a simple Query Analyzer look-alike, but being small and free it can be run where the SQL Server client tools are not installed or licensed. This makes it especially useful as a query tool for MSDE and SQL Express. It also connects to Oracle and other OLE-DB compliant databases.&lt;br&gt;&lt;a href=&quot;http://www.albahari.com/queryexpress.aspx&quot;&gt;http://www.albahari.com/queryexpress.aspx&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;dbForge SQL Complete&lt;br&gt;&lt;/strong&gt;dbForge SQL Complete is a useful add-in for Microsoft SQL Server Management Studio and Microsoft Visual Studio. Free and advanced paid editions of the SQL code formatter offer powerful autocompletion and formatting of T-SQL code that replaces native Microsoft T-SQL Intellisense.&lt;br&gt;&lt;a href=&quot;http://www.devart.com/dbforge/sql/sqlcomplete/&quot;&gt;http://www.devart.com/dbforge/sql/sqlcomplete/&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;ClipX &lt;br&gt;&lt;/strong&gt;ClipX is a tiny clipboard history manager. It is sweet, it is free, use it.&lt;br&gt;&lt;a href=&quot;http://bluemars.org/clipx/&quot;&gt;http://bluemars.org/clipx/&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Log Parser Lizard GUI - FREE Query Software&lt;br&gt;&lt;/strong&gt;Log Parser is wonderful because it effectively lets you run SQL queries against text files&lt;br&gt;&lt;a href=&quot;http://www.lizard-labs.net/log_parser_lizard.aspx&quot;&gt;http://www.lizard-labs.net/log_parser_lizard.aspx&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;em&gt;Fonte: &lt;em&gt;&lt;a title=&quot;Scott Hanselman&#39;s 2014 Ultimate Developer and Power Users Tool List for Windows&quot; href=&quot;http://www.hanselman.com/blog/ScottHanselmans2014UltimateDeveloperAndPowerUsersToolListForWindows.aspx&quot; target=&quot;_blank&quot;&gt;Scott Hanselman&#39;s 2014 Ultimate Developer and Power Users Tool List for Windows&lt;/a&gt;&lt;/em&gt;&lt;/em&gt;&lt;/p&gt;  </content><link rel='replies' type='application/atom+xml' href='http://edipooliveira.blogspot.com/feeds/1436053608023199764/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://edipooliveira.blogspot.com/2013/12/softwares-muito-uteis.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4892576122733604611/posts/default/1436053608023199764'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4892576122733604611/posts/default/1436053608023199764'/><link rel='alternate' type='text/html' href='http://edipooliveira.blogspot.com/2013/12/softwares-muito-uteis.html' title='Softwares muito úteis'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/06382455493229615250</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4892576122733604611.post-4853431234933168653</id><published>2013-12-19T15:06:00.000-02:00</published><updated>2013-12-19T15:06:33.073-02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Publicidade Online"/><category scheme="http://www.blogger.com/atom/ns#" term="User Experience"/><title type='text'>IAB Brasil/comScore - Consumo de Mídia</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Interessante artigo sobre o consumo de mídias pelo público brasileiro.&lt;br /&gt;
&lt;br /&gt;
http://goo.gl/29BsvZ&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;iframe allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;356&quot; marginheight=&quot;0&quot; marginwidth=&quot;0&quot; scrolling=&quot;no&quot; src=&quot;http://www.slideshare.net/slideshow/embed_code/16144260&quot; style=&quot;border-width: 1px 1px 0; border: 1px solid #CCC; margin-bottom: 5px;&quot; width=&quot;427&quot;&gt; &lt;/iframe&gt; &lt;br /&gt;
&lt;div style=&quot;margin-bottom: 5px;&quot;&gt;
&lt;strong&gt; &lt;a href=&quot;https://www.slideshare.net/dwinterbr/iab-brasil-conectadoconsumodemedia-16144260&quot; target=&quot;_blank&quot; title=&quot;IAB Brasil/comScore - Consumo de Mídia : Jun2012&quot;&gt;IAB Brasil/comScore - Consumo de Mídia : Jun2012&lt;/a&gt; &lt;/strong&gt; from &lt;strong&gt;&lt;a href=&quot;http://www.slideshare.net/dwinterbr&quot; target=&quot;_blank&quot;&gt;Daniel Winter&lt;/a&gt;&lt;/strong&gt; &lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://edipooliveira.blogspot.com/feeds/4853431234933168653/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://edipooliveira.blogspot.com/2013/12/iab-brasilcomscore-consumo-de-midia.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4892576122733604611/posts/default/4853431234933168653'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4892576122733604611/posts/default/4853431234933168653'/><link rel='alternate' type='text/html' href='http://edipooliveira.blogspot.com/2013/12/iab-brasilcomscore-consumo-de-midia.html' title='IAB Brasil/comScore - Consumo de Mídia'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/06382455493229615250</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4892576122733604611.post-7407969467761180410</id><published>2013-12-19T14:45:00.003-02:00</published><updated>2013-12-19T14:45:58.596-02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Arquitetura Informação"/><category scheme="http://www.blogger.com/atom/ns#" term="Facebook"/><category scheme="http://www.blogger.com/atom/ns#" term="User Experience"/><title type='text'>Facebook na prática com User Experience</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Apresentação muito interessante.&lt;br /&gt;
&lt;br /&gt;
http://goo.gl/jz0e2p&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;iframe allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;355&quot; marginheight=&quot;0&quot; marginwidth=&quot;0&quot; scrolling=&quot;no&quot; src=&quot;http://www.slideshare.net/slideshow/embed_code/15934306&quot; style=&quot;border-width: 1px 1px 0; border: 1px solid #CCC; margin-bottom: 5px;&quot; width=&quot;425&quot;&gt; &lt;/iframe&gt; &lt;br /&gt;
&lt;div style=&quot;margin-bottom: 5px;&quot;&gt;
&lt;strong&gt; &lt;a href=&quot;https://www.slideshare.net/LeandroHipolito/facebook-na-prtica-com-user-experience&quot; target=&quot;_blank&quot; title=&quot;Facebook na prática com User Experience&quot;&gt;Facebook na prática com User Experience&lt;/a&gt; &lt;/strong&gt; from &lt;strong&gt;&lt;a href=&quot;http://www.slideshare.net/LeandroHipolito&quot; target=&quot;_blank&quot;&gt;Leandro Hipolito&lt;/a&gt;&lt;/strong&gt; &lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://edipooliveira.blogspot.com/feeds/7407969467761180410/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://edipooliveira.blogspot.com/2013/12/facebook-na-pratica-com-user-experience.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4892576122733604611/posts/default/7407969467761180410'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4892576122733604611/posts/default/7407969467761180410'/><link rel='alternate' type='text/html' href='http://edipooliveira.blogspot.com/2013/12/facebook-na-pratica-com-user-experience.html' title='Facebook na prática com User Experience'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/06382455493229615250</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4892576122733604611.post-8657704517117687467</id><published>2013-12-14T17:49:00.001-02:00</published><updated>2013-12-14T17:53:44.114-02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SQL"/><category scheme="http://www.blogger.com/atom/ns#" term="SQLEXPRESS"/><title type='text'>CREATE DATABASE permission denied in database &#39;master&#39;</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
1. &amp;nbsp;shut down SQL Server from services&lt;br /&gt;
&lt;br /&gt;
2. &amp;nbsp;open cmd window (as admin) and run single-user mode as local admin with this command:&lt;br /&gt;
&quot;c:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\Binn\sqlservr.exe&quot; -m -s SQLEXPRESS&lt;br /&gt;
&lt;br /&gt;
3. &amp;nbsp;open another cmd window (as admin)&lt;br /&gt;
&lt;br /&gt;
4. &amp;nbsp;open sqlcmd:&lt;br /&gt;
sqlcmd -S .\SQLEXPRESS&lt;br /&gt;
Now add the sysadmin user:&lt;br /&gt;
a. &amp;nbsp;sp_addsrvrolemember &#39;domain\user&#39;, &#39;sysadmin&#39;&lt;br /&gt;
b. &amp;nbsp;GO&lt;br /&gt;
&lt;br /&gt;
5. &amp;nbsp;now Ctrl+C the single-user mode from the first cmd window to kill SQL Server. &amp;nbsp;Now restart it from services the normal way. &amp;nbsp;Log into Management Studio and the user you created should be listed under logins with the credential of &quot;sysadmin.&quot;&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;Fonte:&amp;nbsp;&lt;a href=&quot;http://social.msdn.microsoft.com/Forums/sqlserver/en-US/76fc84f9-437c-4e71-ba3d-3c9ae794a7c4/sql-express-2008-r2-create-database-permission-denied-in-database-master?forum=sqlexpress&quot;&gt;http://social.msdn.microsoft.com/Forums/sqlserver/en-US/76fc84f9-437c-4e71-ba3d-3c9ae794a7c4/sql-express-2008-r2-create-database-permission-denied-in-database-master?forum=sqlexpress&lt;/a&gt;&lt;/i&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://edipooliveira.blogspot.com/feeds/8657704517117687467/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://edipooliveira.blogspot.com/2013/12/create-database-permission-denied-in.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4892576122733604611/posts/default/8657704517117687467'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4892576122733604611/posts/default/8657704517117687467'/><link rel='alternate' type='text/html' href='http://edipooliveira.blogspot.com/2013/12/create-database-permission-denied-in.html' title='CREATE DATABASE permission denied in database &#39;master&#39;'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/06382455493229615250</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4892576122733604611.post-519493337125853877</id><published>2013-09-07T23:15:00.002-03:00</published><updated>2013-09-07T23:15:32.118-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term=".NET"/><title type='text'>Gerando números aleatórios</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Ao criar dois objetos &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/system.random.aspx&quot;&gt;Randon&lt;/a&gt;, no mesmo milisegundo, ocorrerá um problema. Todos os números gerados por ambos os objetos serão iguais.&lt;br /&gt;
A solução para isso é utilizar o método &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/system.threading.thread.sleep.aspx&quot;&gt;Sleep&lt;/a&gt; para dar um tempo de 3 milisegundos entre a criação de cada uma das instâncias dos objetos&amp;nbsp;&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/system.random.aspx&quot;&gt;Randon&lt;/a&gt;, ou utilizar o mesmo objeto para gerar o outro número.&lt;br /&gt;
&lt;br /&gt;
Random r1 = new Random();&lt;br /&gt;
Random r2 = new Random();&lt;br /&gt;
int a1 = r1.Next();&lt;br /&gt;
int a2 = r2.Next();&lt;br /&gt;
&lt;br /&gt;
As variáveis a1 e a2 terão o mesmo valor.&lt;br /&gt;
&lt;br /&gt;
Random r1 = new Random();&lt;br /&gt;
System.Threading.Thread.Sleep(3);&lt;br /&gt;
Random r2 = new Random();&lt;br /&gt;
int a1 = r1.Next();&lt;br /&gt;
int a2 = r2.Next();&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
As variáveis a1 e a2 terão valores diferentes.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
Random r1 = new Random();&lt;/div&gt;
&lt;div&gt;
int a1 = r1.Next();&lt;/div&gt;
&lt;div&gt;
int a2 = r1.Next();&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
As variáveis a1 e a2 terão valores diferentes.&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://edipooliveira.blogspot.com/feeds/519493337125853877/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://edipooliveira.blogspot.com/2013/09/gerando-numeros-aleatorios.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4892576122733604611/posts/default/519493337125853877'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4892576122733604611/posts/default/519493337125853877'/><link rel='alternate' type='text/html' href='http://edipooliveira.blogspot.com/2013/09/gerando-numeros-aleatorios.html' title='Gerando números aleatórios'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/06382455493229615250</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4892576122733604611.post-4167889741855500202</id><published>2013-08-20T10:56:00.000-03:00</published><updated>2013-08-20T10:56:23.891-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term=".NET"/><title type='text'>Fazendo uma requisição web</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Através da classe &lt;a href=&quot;http://msdn.microsoft.com/pt-br/library/system.net.httpwebrequest.aspx&quot;&gt;HttpWebRequest&lt;/a&gt; é possível fazer uma requisição à qualquer página da web, podendo pegar todo o seu conteúdo HTML.&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://edipooliveira.blogspot.com/feeds/4167889741855500202/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://edipooliveira.blogspot.com/2013/08/fazendo-uma-requisicao-web.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4892576122733604611/posts/default/4167889741855500202'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4892576122733604611/posts/default/4167889741855500202'/><link rel='alternate' type='text/html' href='http://edipooliveira.blogspot.com/2013/08/fazendo-uma-requisicao-web.html' title='Fazendo uma requisição web'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/06382455493229615250</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4892576122733604611.post-7817632141250179340</id><published>2012-08-26T21:33:00.001-03:00</published><updated>2012-08-26T21:33:34.894-03:00</updated><title type='text'>Foco após requisição Ajax</title><content type='html'>&lt;p&gt;Para não perder o foco após uma requisição ajax do updatepanel é possível utilizar a função EndRequest.&lt;/p&gt;  &lt;div id=&quot;codeSnippetWrapper&quot;&gt;   &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot; id=&quot;codeSnippet&quot;&gt;var ID;&lt;br /&gt;&lt;br /&gt;Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);&lt;br /&gt;&lt;br /&gt;$(&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;input.campo-texto1&amp;quot;&lt;/span&gt;).live(&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;focus&amp;quot;&lt;/span&gt;, function () {&lt;br /&gt;    ID = $(&lt;span style=&quot;color: #0000ff&quot;&gt;this&lt;/span&gt;).attr(&lt;span style=&quot;color: #006080&quot;&gt;&#39;id&#39;&lt;/span&gt;);&lt;br /&gt;});&lt;br /&gt;&lt;br /&gt;function EndRequestHandler(sender, args) {&lt;br /&gt;    $(&lt;span style=&quot;color: #006080&quot;&gt;&#39;#&#39;&lt;/span&gt; + ID).focus();&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;&lt;/div&gt;  </content><link rel='replies' type='application/atom+xml' href='http://edipooliveira.blogspot.com/feeds/7817632141250179340/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://edipooliveira.blogspot.com/2012/08/foco-apos-requisicao-ajax.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4892576122733604611/posts/default/7817632141250179340'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4892576122733604611/posts/default/7817632141250179340'/><link rel='alternate' type='text/html' href='http://edipooliveira.blogspot.com/2012/08/foco-apos-requisicao-ajax.html' title='Foco após requisição Ajax'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/06382455493229615250</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4892576122733604611.post-6957637699721393167</id><published>2012-04-08T19:57:00.001-03:00</published><updated>2012-04-08T19:57:38.853-03:00</updated><title type='text'>ASP.NET AJAX v1.0 Sys is undefined error</title><content type='html'>&lt;p&gt;“I have seen many blog entries and forum threads on this error however I was curious if anyone has any insight as to why this error seems to occur on Windows 2003 Server SP1 and not XP Pro SP2. I have not tested on Windows 2000 or 2003 without SP1.&lt;/p&gt;  &lt;p&gt; When I deployed my application to the production server which is Windows Server 2003 SP1, I received this error after the ASP.NET AJAX 1.0 installation. Now I have never used a beta or RC release so this is the first time using ASP.NET AJAX in my application.&lt;/p&gt;  &lt;p&gt;I turned to Google and I found the following:&lt;/p&gt;  &lt;p&gt;if you are using Windows 2003 as web server then you&#39;ll face this &amp;quot;sys is undefined&amp;quot; error .to get rid of this weird problem follow the following steps:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Open IIS and right click on your web site virtual directory and then click properties &lt;/li&gt;    &lt;li&gt;Then on virtual directory tab click on configuration button &lt;/li&gt;    &lt;li&gt;In mappings tab set the configuration like this.     &lt;br /&gt;Executable: &amp;quot;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll&amp;quot; - locate this dll file      &lt;br /&gt;Extension: .axd      &lt;br /&gt;Verbs: All Verbs      &lt;br /&gt;Script Engine: checked      &lt;br /&gt;Check that file exists: do not check this.&lt;/li&gt;    &lt;li&gt;Finally click OK.&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;The axd extension was in fact registered on the server but the Verbs was not set to allow all.”&lt;/p&gt;  &lt;p&gt;&lt;em&gt;Fonte: &lt;/em&gt;&lt;a href=&quot;http://aspadvice.com/blogs/sswafford/archive/2007/01/25/ASP.NET-AJAX-v1.0-Sys-is-undefined-error.aspx&quot;&gt;&lt;em&gt;http://aspadvice.com/blogs/sswafford/archive/2007/01/25/ASP.NET-AJAX-v1.0-Sys-is-undefined-error.aspx&lt;/em&gt;&lt;/a&gt;&lt;/p&gt;  </content><link rel='replies' type='application/atom+xml' href='http://edipooliveira.blogspot.com/feeds/6957637699721393167/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://edipooliveira.blogspot.com/2012/04/aspnet-ajax-v10-sys-is-undefined-error.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4892576122733604611/posts/default/6957637699721393167'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4892576122733604611/posts/default/6957637699721393167'/><link rel='alternate' type='text/html' href='http://edipooliveira.blogspot.com/2012/04/aspnet-ajax-v10-sys-is-undefined-error.html' title='ASP.NET AJAX v1.0 Sys is undefined error'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/06382455493229615250</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4892576122733604611.post-2252065120633419935</id><published>2012-04-08T19:50:00.001-03:00</published><updated>2012-04-08T19:51:50.275-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SQL"/><category scheme="http://www.blogger.com/atom/ns#" term="Stored Procedure"/><title type='text'>Navegar em todas as tabelas</title><content type='html'>&lt;p&gt;SP que executa comandos SQL para cada uma das tabelas do banco de dados.    &lt;br /&gt;&amp;#160; &lt;br /&gt;Acredite, pode ser útil.     &lt;br /&gt;&amp;#160; &lt;br /&gt;&lt;a href=&quot;http://weblogs.asp.net/nunogomes/archive/2008/08/19/sql-server-undocumented-stored-procedure-sp-msforeachtable.aspx&quot;&gt;http://weblogs.asp.net/nunogomes/archive/2008/08/19/sql-server-undocumented-stored-procedure-sp-msforeachtable.aspx&lt;/a&gt;&lt;/p&gt; Exemplo:   &lt;br /&gt;  &lt;br /&gt;exec sp_MSforeachtable @command1 = &amp;quot;select * from ?&amp;quot;     </content><link rel='replies' type='application/atom+xml' href='http://edipooliveira.blogspot.com/feeds/2252065120633419935/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://edipooliveira.blogspot.com/2012/04/navegar-em-todas-as-tabelas.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4892576122733604611/posts/default/2252065120633419935'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4892576122733604611/posts/default/2252065120633419935'/><link rel='alternate' type='text/html' href='http://edipooliveira.blogspot.com/2012/04/navegar-em-todas-as-tabelas.html' title='Navegar em todas as tabelas'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/06382455493229615250</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4892576122733604611.post-8725770449090956449</id><published>2012-04-08T19:35:00.001-03:00</published><updated>2012-04-08T19:35:49.960-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript"/><title type='text'>Multiupload de arquivo sem flash</title><content type='html'>&lt;p&gt;Funciona no IE7 e 8 inclusive e vem com tutoriais para várias linguagens/frameworks.&lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;http://blueimp.github.com/jQuery-File-Upload/&quot;&gt;http://blueimp.github.com/jQuery-File-Upload/&lt;/a&gt;&lt;/p&gt;  </content><link rel='replies' type='application/atom+xml' href='http://edipooliveira.blogspot.com/feeds/8725770449090956449/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://edipooliveira.blogspot.com/2012/04/multiupload-de-arquivo-sem-flash.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4892576122733604611/posts/default/8725770449090956449'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4892576122733604611/posts/default/8725770449090956449'/><link rel='alternate' type='text/html' href='http://edipooliveira.blogspot.com/2012/04/multiupload-de-arquivo-sem-flash.html' title='Multiupload de arquivo sem flash'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/06382455493229615250</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4892576122733604611.post-3022825039604643786</id><published>2011-07-02T14:23:00.001-03:00</published><updated>2011-07-02T14:23:29.116-03:00</updated><title type='text'>Filtro com Check-Box para GridView</title><content type='html'>&lt;p&gt;Filtro semelhante aos filtros utilizados no excel.&lt;/p&gt;  &lt;p&gt;Segue abaixo os links:&lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;http://community.devexpress.com/blogs/aspnet/archive/2011/07/01/asp-net-gridview-how-to-add-multiple-check-box-column-filter.aspx&quot; target=&quot;_blank&quot;&gt;ASP.NET GridView: How-To Add Multiple Check-Box Column Filter&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;http://www.devexpress.com/Support/Center/e/E214.aspx&quot; target=&quot;_blank&quot;&gt;Implementing pivot grid like filtration style&lt;/a&gt;&lt;/p&gt;  </content><link rel='replies' type='application/atom+xml' href='http://edipooliveira.blogspot.com/feeds/3022825039604643786/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://edipooliveira.blogspot.com/2011/07/filtro-com-check-box-para-gridview.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4892576122733604611/posts/default/3022825039604643786'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4892576122733604611/posts/default/3022825039604643786'/><link rel='alternate' type='text/html' href='http://edipooliveira.blogspot.com/2011/07/filtro-com-check-box-para-gridview.html' title='Filtro com Check-Box para GridView'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/06382455493229615250</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4892576122733604611.post-6715208983205899038</id><published>2011-05-01T20:51:00.001-03:00</published><updated>2011-05-01T20:51:51.435-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term=".NET"/><category scheme="http://www.blogger.com/atom/ns#" term="Ajax"/><category scheme="http://www.blogger.com/atom/ns#" term="Controles Personalizados"/><title type='text'>Personalizando o HTML do UpdatePanel</title><content type='html'>&lt;p&gt;Segue abaixo uma classe que tem como objetivo personalizar o HTML gerado a partir de um UpdatePanel.&lt;/p&gt;  &lt;div id=&quot;codeSnippetWrapper&quot;&gt;   &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot; id=&quot;codeSnippet&quot;&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;namespace&lt;/span&gt; LeftSlipper {&lt;br /&gt;    &lt;span style=&quot;color: #0000ff&quot;&gt;using&lt;/span&gt; System;&lt;br /&gt;    &lt;span style=&quot;color: #0000ff&quot;&gt;using&lt;/span&gt; System.ComponentModel;&lt;br /&gt;    &lt;span style=&quot;color: #0000ff&quot;&gt;using&lt;/span&gt; System.Web.UI;&lt;br /&gt;    &lt;span style=&quot;color: #0000ff&quot;&gt;using&lt;/span&gt; Microsoft.Web.UI;&lt;br /&gt;&lt;br /&gt;    &lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;class&lt;/span&gt; CustomUpdatePanel : UpdatePanel {&lt;br /&gt;        &lt;span style=&quot;color: #0000ff&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;string&lt;/span&gt; _cssClass;&lt;br /&gt;        &lt;span style=&quot;color: #0000ff&quot;&gt;private&lt;/span&gt; HtmlTextWriterTag _tag = HtmlTextWriterTag.Div;&lt;br /&gt;&lt;br /&gt;        [DefaultValue(&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;&amp;quot;&lt;/span&gt;)]&lt;br /&gt;        [Description(&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;Applies a CSS style to the panel.&amp;quot;&lt;/span&gt;)]&lt;br /&gt;        &lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;string&lt;/span&gt; CssClass {&lt;br /&gt;            get {&lt;br /&gt;                &lt;span style=&quot;color: #0000ff&quot;&gt;return&lt;/span&gt; _cssClass ?? String.Empty;&lt;br /&gt;            }&lt;br /&gt;            set {&lt;br /&gt;                _cssClass = &lt;span style=&quot;color: #0000ff&quot;&gt;value&lt;/span&gt;;&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        &lt;span style=&quot;color: #008000&quot;&gt;// Hide the base class&#39;s RenderMode property since we don&#39;t use it&lt;/span&gt;&lt;br /&gt;        [Browsable(&lt;span style=&quot;color: #0000ff&quot;&gt;false&lt;/span&gt;)]&lt;br /&gt;        [EditorBrowsable(EditorBrowsableState.Never)]&lt;br /&gt;        [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]&lt;br /&gt;        &lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; UpdatePanelRenderMode RenderMode {&lt;br /&gt;            get {&lt;br /&gt;                &lt;span style=&quot;color: #0000ff&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;base&lt;/span&gt;.RenderMode;&lt;br /&gt;            }&lt;br /&gt;            set {&lt;br /&gt;                &lt;span style=&quot;color: #0000ff&quot;&gt;base&lt;/span&gt;.RenderMode = &lt;span style=&quot;color: #0000ff&quot;&gt;value&lt;/span&gt;;&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        [DefaultValue(HtmlTextWriterTag.Div)]&lt;br /&gt;        [Description(&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;The tag to render for the panel.&amp;quot;&lt;/span&gt;)]&lt;br /&gt;        &lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; HtmlTextWriterTag Tag {&lt;br /&gt;            get {&lt;br /&gt;                &lt;span style=&quot;color: #0000ff&quot;&gt;return&lt;/span&gt; _tag;&lt;br /&gt;            }&lt;br /&gt;            set {&lt;br /&gt;                _tag = &lt;span style=&quot;color: #0000ff&quot;&gt;value&lt;/span&gt;;&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        &lt;span style=&quot;color: #0000ff&quot;&gt;protected&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;override&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;void&lt;/span&gt; RenderChildren(HtmlTextWriter writer) {&lt;br /&gt;            &lt;span style=&quot;color: #0000ff&quot;&gt;if&lt;/span&gt; (IsInPartialRendering) {&lt;br /&gt;                &lt;span style=&quot;color: #008000&quot;&gt;// If the UpdatePanel is rendering in &amp;quot;partial&amp;quot; mode that means&lt;/span&gt;&lt;br /&gt;                &lt;span style=&quot;color: #008000&quot;&gt;// it&#39;s the top-level UpdatePanel in this part of the page, so&lt;/span&gt;&lt;br /&gt;                &lt;span style=&quot;color: #008000&quot;&gt;// it doesn&#39;t render its outer tag. We just delegate to the base&lt;/span&gt;&lt;br /&gt;                &lt;span style=&quot;color: #008000&quot;&gt;// class to do all the work.&lt;/span&gt;&lt;br /&gt;                &lt;span style=&quot;color: #0000ff&quot;&gt;base&lt;/span&gt;.RenderChildren(writer);&lt;br /&gt;            }&lt;br /&gt;            &lt;span style=&quot;color: #0000ff&quot;&gt;else&lt;/span&gt; {&lt;br /&gt;                &lt;span style=&quot;color: #008000&quot;&gt;// If we&#39;re rendering in normal HTML mode we do all the new custom&lt;/span&gt;&lt;br /&gt;                &lt;span style=&quot;color: #008000&quot;&gt;// rendering. We then go render our children, which is what the&lt;/span&gt;&lt;br /&gt;                &lt;span style=&quot;color: #008000&quot;&gt;// normal control&#39;s behavior is.&lt;/span&gt;&lt;br /&gt;                writer.AddAttribute(HtmlTextWriterAttribute.Id, ClientID);&lt;br /&gt;                &lt;span style=&quot;color: #0000ff&quot;&gt;if&lt;/span&gt; (CssClass.Length &amp;gt; 0) {&lt;br /&gt;                    writer.AddAttribute(HtmlTextWriterAttribute.Class, CssClass);&lt;br /&gt;                }&lt;br /&gt;                writer.RenderBeginTag(Tag);&lt;br /&gt;                &lt;span style=&quot;color: #0000ff&quot;&gt;foreach&lt;/span&gt; (Control child &lt;span style=&quot;color: #0000ff&quot;&gt;in&lt;/span&gt; Controls) {&lt;br /&gt;                    child.RenderControl(writer);&lt;br /&gt;                }&lt;br /&gt;                writer.RenderEndTag();&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;Abaixo, a sua aplicação.&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div id=&quot;codeSnippetWrapper&quot;&gt;&lt;br /&gt;  &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot; id=&quot;codeSnippet&quot;&gt;&lt;span style=&quot;background-color: #ffff00&quot;&gt;&amp;lt;%@ Register Namespace=&amp;quot;LeftSlipper&amp;quot; TagPrefix=&amp;quot;ls&amp;quot; %&amp;gt;&lt;/span&gt;&lt;br /&gt;...&lt;br /&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #800000&quot;&gt;ls:CustomUpdatePanel&lt;/span&gt; &lt;span style=&quot;color: #ff0000&quot;&gt;runat&lt;/span&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;=&amp;quot;server&amp;quot;&lt;/span&gt; &lt;span style=&quot;color: #ff0000&quot;&gt;ID&lt;/span&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;=&amp;quot;CustomUpdatePanel1&amp;quot;&lt;/span&gt;&lt;br /&gt;    &lt;span style=&quot;color: #ff0000&quot;&gt;CssClass&lt;/span&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;=&amp;quot;greenPanel&amp;quot;&lt;/span&gt; &lt;span style=&quot;color: #ff0000&quot;&gt;Tag&lt;/span&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;=&amp;quot;B&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style=&quot;color: #0000ff&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #800000&quot;&gt;ContentTemplate&lt;/span&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style=&quot;color: #0000ff&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #800000&quot;&gt;asp:Label&lt;/span&gt; &lt;span style=&quot;color: #ff0000&quot;&gt;ID&lt;/span&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;=&amp;quot;Label1&amp;quot;&lt;/span&gt; &lt;span style=&quot;color: #ff0000&quot;&gt;runat&lt;/span&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;=&amp;quot;server&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #800000&quot;&gt;asp:Label&lt;/span&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style=&quot;color: #0000ff&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #800000&quot;&gt;asp:Button&lt;/span&gt; &lt;span style=&quot;color: #ff0000&quot;&gt;ID&lt;/span&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;=&amp;quot;Button1&amp;quot;&lt;/span&gt; &lt;span style=&quot;color: #ff0000&quot;&gt;runat&lt;/span&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;=&amp;quot;server&amp;quot;&lt;/span&gt; &lt;span style=&quot;color: #ff0000&quot;&gt;Text&lt;/span&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;=&amp;quot;Button&amp;quot;&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style=&quot;color: #0000ff&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #800000&quot;&gt;ContentTemplate&lt;/span&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #800000&quot;&gt;ls:CustomUpdatePanel&lt;/span&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;ls:CustomUpdatePanel runat=&amp;quot;server&amp;quot; ID=&amp;quot;CustomUpdatePanel1&amp;quot;&lt;br /&gt;    CssClass=&amp;quot;greenPanel&amp;quot; Tag=&amp;quot;B&amp;quot;&lt;span style=&quot;color: #0000ff&quot;&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style=&quot;color: #0000ff&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #800000&quot;&gt;ContentTemplate&lt;/span&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style=&quot;color: #0000ff&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #800000&quot;&gt;asp:Label&lt;/span&gt; &lt;span style=&quot;color: #ff0000&quot;&gt;ID&lt;/span&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;=&amp;quot;Label1&amp;quot;&lt;/span&gt; &lt;span style=&quot;color: #ff0000&quot;&gt;runat&lt;/span&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;=&amp;quot;server&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #800000&quot;&gt;asp:Label&lt;/span&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style=&quot;color: #0000ff&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #800000&quot;&gt;asp:Button&lt;/span&gt; &lt;span style=&quot;color: #ff0000&quot;&gt;ID&lt;/span&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;=&amp;quot;Button1&amp;quot;&lt;/span&gt; &lt;span style=&quot;color: #ff0000&quot;&gt;runat&lt;/span&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;=&amp;quot;server&amp;quot;&lt;/span&gt; &lt;span style=&quot;color: #ff0000&quot;&gt;Text&lt;/span&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;=&amp;quot;Button&amp;quot;&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style=&quot;color: #0000ff&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #800000&quot;&gt;ContentTemplate&lt;/span&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #800000&quot;&gt;ls:CustomUpdatePanel&lt;/span&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;And here&#39;s what got rendered with these settings (actual times may vary!):&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #800000&quot;&gt;b&lt;/span&gt; &lt;span style=&quot;color: #ff0000&quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;=&amp;quot;CustomUpdatePanel1&amp;quot;&lt;/span&gt; &lt;span style=&quot;color: #ff0000&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;=&amp;quot;greenPanel&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style=&quot;color: #0000ff&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #800000&quot;&gt;span&lt;/span&gt; &lt;span style=&quot;color: #ff0000&quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;=&amp;quot;Label1&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;&amp;gt;&lt;/span&gt;12/6/2006 9:18:07 PM&lt;span style=&quot;color: #0000ff&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #800000&quot;&gt;span&lt;/span&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style=&quot;color: #0000ff&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #800000&quot;&gt;input&lt;/span&gt; &lt;span style=&quot;color: #ff0000&quot;&gt;type&lt;/span&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;=&amp;quot;submit&amp;quot;&lt;/span&gt; &lt;span style=&quot;color: #ff0000&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;=&amp;quot;Button1&amp;quot;&lt;/span&gt; &lt;span style=&quot;color: #ff0000&quot;&gt;value&lt;/span&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;=&amp;quot;Button&amp;quot;&lt;/span&gt; &lt;span style=&quot;color: #ff0000&quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;=&amp;quot;Button1&amp;quot;&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #800000&quot;&gt;b&lt;/span&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;Este mesmo princípio pode ser utilizado para modificar qualquer controle.&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;em&gt;Fonte: &lt;/em&gt;&lt;a title=&quot;Customizing the rendering of the UpdatePanel&quot; href=&quot;http://weblogs.asp.net/leftslipper/archive/2006/12/06/customizing-the-rendering-of-the-updatepanel.aspx&quot; target=&quot;_blank&quot;&gt;&lt;em&gt;Eilon Lipton&#39;s Blog&lt;/em&gt;&lt;/a&gt;&lt;/div&gt;  </content><link rel='replies' type='application/atom+xml' href='http://edipooliveira.blogspot.com/feeds/6715208983205899038/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://edipooliveira.blogspot.com/2011/05/personalizando-o-html-do-updatepanel.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4892576122733604611/posts/default/6715208983205899038'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4892576122733604611/posts/default/6715208983205899038'/><link rel='alternate' type='text/html' href='http://edipooliveira.blogspot.com/2011/05/personalizando-o-html-do-updatepanel.html' title='Personalizando o HTML do UpdatePanel'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/06382455493229615250</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4892576122733604611.post-1840614321448103028</id><published>2011-05-01T20:44:00.001-03:00</published><updated>2011-05-01T20:45:56.582-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term=".NET"/><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript"/><category scheme="http://www.blogger.com/atom/ns#" term="Validações"/><title type='text'>Javascript - Validação Client-Side</title><content type='html'>&lt;p&gt;Artigo muito interessante sobre validações.&lt;/p&gt;  &lt;p&gt;&lt;a title=&quot;A detailed examination of the workings of ASP.NET validation Web controls.&quot; href=&quot;http://msdn.microsoft.com/en-us/library/Aa479045&quot; target=&quot;_blank&quot;&gt;ASP.NET Validation in Depth&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Segue abaixo um dos trechos do artigo, que fala sobre as funções javascript que existem para manipular os controles de validação.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;ValidatorValidate(val)&lt;/strong&gt;     &lt;br /&gt;Tem como parâmetro client-validator. Esta função faz com que o seja feito a verificação e que atualize de sua exibição.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;ValidatorEnable(val, enable)&lt;/strong&gt;     &lt;br /&gt;Tem como parâmetro um client-validator e um valor booleano. Esta função ativa ou desativa um client-validator.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;ValidatorHookupControl(control, val)&lt;/strong&gt;     &lt;br /&gt;Tem como parâmetro um elemento HTML e um client-validator. Esta função modifica ou cria o vínculo entre um controle e client-validator. Logo, é possível modificar os “apontamentos” entre controle e client-validator.&lt;/p&gt;  &lt;p&gt;Além destre trecho, existem vários outros pontos abordados sobre validações.&lt;/p&gt;  &lt;p&gt;&lt;em&gt;Fonte: &lt;/em&gt;&lt;a title=&quot;ASP.NET Validation in Depth&quot; href=&quot;http://msdn.microsoft.com/en-us/library/Aa479045&quot; target=&quot;_blank&quot;&gt;&lt;em&gt;MSDN&lt;/em&gt;&lt;/a&gt;&lt;/p&gt;  </content><link rel='replies' type='application/atom+xml' href='http://edipooliveira.blogspot.com/feeds/1840614321448103028/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://edipooliveira.blogspot.com/2011/05/javascript-validacao-client-side.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4892576122733604611/posts/default/1840614321448103028'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4892576122733604611/posts/default/1840614321448103028'/><link rel='alternate' type='text/html' href='http://edipooliveira.blogspot.com/2011/05/javascript-validacao-client-side.html' title='Javascript - Validação Client-Side'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/06382455493229615250</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4892576122733604611.post-8148306209992936481</id><published>2011-05-01T20:17:00.001-03:00</published><updated>2011-05-01T20:18:49.422-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term=".NET"/><category scheme="http://www.blogger.com/atom/ns#" term="Controles Personalizados"/><title type='text'>Criando Controles de Servidor Personalizados com Validação</title><content type='html'>&lt;p&gt;Artigo muito interessante extraído do site &lt;a title=&quot;Criando Controles de Servidor Personalizados com Validação&quot; href=&quot;http://www.devmedia.com.br/articles/viewcomp.asp?comp=6623&quot; target=&quot;_blank&quot;&gt;devmedia&lt;/a&gt;, nele mostra como criar uma Class Library com customização de controles e validações.&lt;/p&gt;  &lt;p&gt;Segue abaixo o código criado da Class Library:&lt;/p&gt;  &lt;div id=&quot;codeSnippetWrapper&quot;&gt;   &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot; id=&quot;codeSnippet&quot;&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;using&lt;/span&gt; System;&lt;br /&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;using&lt;/span&gt; System.Collections.Generic;&lt;br /&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;using&lt;/span&gt; System.Text;&lt;br /&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;using&lt;/span&gt; System.Web.UI;&lt;br /&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;using&lt;/span&gt; System.Web.UI.WebControls;&lt;br /&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;using&lt;/span&gt; System.Text.RegularExpressions;&lt;br /&gt; &lt;br /&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;namespace&lt;/span&gt; CustomControls&lt;br /&gt;{&lt;br /&gt;   &lt;span style=&quot;color: #008000&quot;&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;&lt;br /&gt;   &lt;span style=&quot;color: #008000&quot;&gt;/// Tipos Predefinidos&lt;/span&gt;&lt;br /&gt;   &lt;span style=&quot;color: #008000&quot;&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;br /&gt;   &lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;enum&lt;/span&gt; TypeExpression : &lt;span style=&quot;color: #0000ff&quot;&gt;short&lt;/span&gt;&lt;br /&gt;   {&lt;br /&gt;      None, Digito, Decimal, Moeda, Email, Telefone&lt;br /&gt;   }&lt;br /&gt; &lt;br /&gt;   &lt;span style=&quot;color: #008000&quot;&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;&lt;br /&gt;   &lt;span style=&quot;color: #008000&quot;&gt;/// Classe que apresenta controle TextBox com controle de validação&lt;/span&gt;&lt;br /&gt;   &lt;span style=&quot;color: #008000&quot;&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;br /&gt;   &lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;class&lt;/span&gt; CustomTextBox : Control, INamingContainer&lt;br /&gt;   {&lt;br /&gt; &lt;br /&gt;       &lt;span style=&quot;color: #0000ff&quot;&gt;private&lt;/span&gt; TypeExpression _valueType;&lt;br /&gt; &lt;br /&gt;       &lt;span style=&quot;color: #008000&quot;&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;&lt;br /&gt;       &lt;span style=&quot;color: #008000&quot;&gt;/// Tipos predefinidos&lt;/span&gt;&lt;br /&gt;       &lt;span style=&quot;color: #008000&quot;&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;br /&gt;       &lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; TypeExpression ValueType&lt;br /&gt;       {&lt;br /&gt;            get { &lt;span style=&quot;color: #0000ff&quot;&gt;return&lt;/span&gt; _valueType; }&lt;br /&gt;            set { _valueType = &lt;span style=&quot;color: #0000ff&quot;&gt;value&lt;/span&gt;; }&lt;br /&gt;       }&lt;br /&gt; &lt;br /&gt;       &lt;span style=&quot;color: #008000&quot;&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;&lt;br /&gt;       &lt;span style=&quot;color: #008000&quot;&gt;/// Controle de Validação&lt;/span&gt;&lt;br /&gt;       &lt;span style=&quot;color: #008000&quot;&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;br /&gt;       RegularExpressionValidator _validator = &lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; RegularExpressionValidator();&lt;br /&gt; &lt;br /&gt;       &lt;span style=&quot;color: #008000&quot;&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;&lt;br /&gt;       &lt;span style=&quot;color: #008000&quot;&gt;/// Expressão de Validação&lt;/span&gt;&lt;br /&gt;       &lt;span style=&quot;color: #008000&quot;&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;br /&gt;       &lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; String ValidationExpression&lt;br /&gt;       {&lt;br /&gt;            get { &lt;span style=&quot;color: #0000ff&quot;&gt;return&lt;/span&gt; _validator.ValidationExpression; }&lt;br /&gt;            set { _validator.ValidationExpression = &lt;span style=&quot;color: #0000ff&quot;&gt;value&lt;/span&gt;; }&lt;br /&gt;        }&lt;br /&gt; &lt;br /&gt;       &lt;span style=&quot;color: #008000&quot;&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;&lt;br /&gt;       &lt;span style=&quot;color: #008000&quot;&gt;/// Mensagem de Erro&lt;/span&gt;&lt;br /&gt;       &lt;span style=&quot;color: #008000&quot;&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;br /&gt;       &lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; String ErrorMessage&lt;br /&gt;       {&lt;br /&gt;            get { &lt;span style=&quot;color: #0000ff&quot;&gt;return&lt;/span&gt; _validator.ErrorMessage; }&lt;br /&gt;            set { _validator.ErrorMessage = &lt;span style=&quot;color: #0000ff&quot;&gt;value&lt;/span&gt;; }&lt;br /&gt;       }&lt;br /&gt; &lt;br /&gt;       &lt;span style=&quot;color: #008000&quot;&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;&lt;br /&gt;       &lt;span style=&quot;color: #008000&quot;&gt;/// Manipula apresentação do validator&lt;/span&gt;&lt;br /&gt;       &lt;span style=&quot;color: #008000&quot;&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;br /&gt;       &lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; ValidatorDisplay  Display&lt;br /&gt;       {&lt;br /&gt;            get { &lt;span style=&quot;color: #0000ff&quot;&gt;return&lt;/span&gt; _validator.Display; }&lt;br /&gt;            set { _validator.Display = &lt;span style=&quot;color: #0000ff&quot;&gt;value&lt;/span&gt;; }&lt;br /&gt;       }&lt;br /&gt; &lt;br /&gt;       &lt;span style=&quot;color: #008000&quot;&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;&lt;br /&gt;       &lt;span style=&quot;color: #008000&quot;&gt;/// Controle TextBox&lt;/span&gt;&lt;br /&gt;       &lt;span style=&quot;color: #008000&quot;&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;br /&gt;       TextBox _textBox = &lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; TextBox();&lt;br /&gt; &lt;br /&gt;       &lt;span style=&quot;color: #008000&quot;&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;&lt;br /&gt;       &lt;span style=&quot;color: #008000&quot;&gt;/// Propriedade Text do controle&lt;/span&gt;&lt;br /&gt;       &lt;span style=&quot;color: #008000&quot;&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;br /&gt;       &lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; String Text&lt;br /&gt;       {&lt;br /&gt;            get { &lt;span style=&quot;color: #0000ff&quot;&gt;return&lt;/span&gt; _textBox.Text; }&lt;br /&gt;            set { _textBox.Text = &lt;span style=&quot;color: #0000ff&quot;&gt;value&lt;/span&gt;; }&lt;br /&gt;       }&lt;br /&gt; &lt;br /&gt;       &lt;span style=&quot;color: #008000&quot;&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;&lt;br /&gt;       &lt;span style=&quot;color: #008000&quot;&gt;/// Propriedade ID do controle&lt;/span&gt;&lt;br /&gt;       &lt;span style=&quot;color: #008000&quot;&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;br /&gt;       &lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;override&lt;/span&gt; String ID&lt;br /&gt;       {&lt;br /&gt;          get { &lt;span style=&quot;color: #0000ff&quot;&gt;return&lt;/span&gt; _textBox.ID; }&lt;br /&gt;            set { _textBox.ID = &lt;span style=&quot;color: #0000ff&quot;&gt;value&lt;/span&gt;; }&lt;br /&gt;       }&lt;br /&gt; &lt;br /&gt;       &lt;span style=&quot;color: #008000&quot;&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;&lt;br /&gt;       &lt;span style=&quot;color: #008000&quot;&gt;/// Largura do Controle&lt;/span&gt;&lt;br /&gt;       &lt;span style=&quot;color: #008000&quot;&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;br /&gt;       &lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; Unit Width&lt;br /&gt;       {&lt;br /&gt;            get { &lt;span style=&quot;color: #0000ff&quot;&gt;return&lt;/span&gt; _textBox.Width; }&lt;br /&gt;            set { _textBox.Width = &lt;span style=&quot;color: #0000ff&quot;&gt;value&lt;/span&gt;; }&lt;br /&gt;       }&lt;br /&gt; &lt;br /&gt;       &lt;span style=&quot;color: #0000ff&quot;&gt;private&lt;/span&gt; Boolean _isNull;&lt;br /&gt; &lt;br /&gt;       &lt;span style=&quot;color: #008000&quot;&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;&lt;br /&gt;       &lt;span style=&quot;color: #008000&quot;&gt;/// Preenchimento obrigatorio&lt;/span&gt;&lt;br /&gt;       &lt;span style=&quot;color: #008000&quot;&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;br /&gt;       &lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; Boolean IsNotNull&lt;br /&gt;       {&lt;br /&gt;            get { &lt;span style=&quot;color: #0000ff&quot;&gt;return&lt;/span&gt; _isNull; }&lt;br /&gt;            set { _isNull = &lt;span style=&quot;color: #0000ff&quot;&gt;value&lt;/span&gt;; }&lt;br /&gt;       }&lt;br /&gt; &lt;br /&gt;       &lt;span style=&quot;color: #008000&quot;&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;&lt;br /&gt;       &lt;span style=&quot;color: #008000&quot;&gt;/// Cria controles filhos&lt;/span&gt;&lt;br /&gt;       &lt;span style=&quot;color: #008000&quot;&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;br /&gt;       &lt;span style=&quot;color: #0000ff&quot;&gt;protected&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;override&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;void&lt;/span&gt; CreateChildControls()&lt;br /&gt;       {&lt;br /&gt;            &lt;span style=&quot;color: #008000&quot;&gt;// manipula TextBox&lt;/span&gt;&lt;br /&gt;            CreateTextBox();&lt;br /&gt; &lt;br /&gt;            &lt;span style=&quot;color: #008000&quot;&gt;// manipula RegularExpressionValidator&lt;/span&gt;&lt;br /&gt;            CreateRegularExpressionValidator();&lt;br /&gt; &lt;br /&gt;            &lt;span style=&quot;color: #008000&quot;&gt;// manipula RequiredFieldValidator&lt;/span&gt;&lt;br /&gt;            CreateRequiredFieldValidator();&lt;br /&gt; &lt;br /&gt;            &lt;span style=&quot;color: #008000&quot;&gt;// manipula SummaryValidator&lt;/span&gt;&lt;br /&gt;            CreateSummary();&lt;br /&gt;       }&lt;br /&gt; &lt;br /&gt;       &lt;span style=&quot;color: #008000&quot;&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;&lt;br /&gt;       &lt;span style=&quot;color: #008000&quot;&gt;/// Monta TextBox e adiciona controle&lt;/span&gt;&lt;br /&gt;       &lt;span style=&quot;color: #008000&quot;&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;br /&gt;       &lt;span style=&quot;color: #0000ff&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;void&lt;/span&gt; CreateTextBox()&lt;br /&gt;       {&lt;br /&gt;            &lt;span style=&quot;color: #008000&quot;&gt;// mude a aparência do controle, etc. aqui&lt;/span&gt;&lt;br /&gt;            &lt;span style=&quot;color: #008000&quot;&gt;// ex.: _textBox.CssClass = &amp;quot;meuCss&amp;quot;;&lt;/span&gt;&lt;br /&gt;            &lt;br /&gt;            &lt;span style=&quot;color: #008000&quot;&gt;// adiciona controle TextBox&lt;/span&gt;&lt;br /&gt;            Controls.Add(_textBox);&lt;br /&gt;       }&lt;br /&gt; &lt;br /&gt;       &lt;span style=&quot;color: #008000&quot;&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;&lt;br /&gt;       &lt;span style=&quot;color: #008000&quot;&gt;/// Monta expressão com o tipo predefinido e adiciona (se expressão informada) &lt;/span&gt;&lt;br /&gt;       &lt;span style=&quot;color: #008000&quot;&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;br /&gt;       &lt;span style=&quot;color: #0000ff&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;void&lt;/span&gt; CreateRegularExpressionValidator()&lt;br /&gt;       {&lt;br /&gt;            &lt;span style=&quot;color: #008000&quot;&gt;// fixa o controle que será validado&lt;/span&gt;&lt;br /&gt;            _validator.ControlToValidate = _textBox.ID;&lt;br /&gt; &lt;br /&gt;            &lt;span style=&quot;color: #008000&quot;&gt;// monta expressão&lt;/span&gt;&lt;br /&gt;            &lt;span style=&quot;color: #0000ff&quot;&gt;if&lt;/span&gt; (String.IsNullOrEmpty(&lt;span style=&quot;color: #0000ff&quot;&gt;this&lt;/span&gt;.ValidationExpression))&lt;br /&gt;            {&lt;br /&gt;                &lt;span style=&quot;color: #008000&quot;&gt;// verifica tipo predefinido&lt;/span&gt;&lt;br /&gt;                &lt;span style=&quot;color: #0000ff&quot;&gt;switch&lt;/span&gt; (&lt;span style=&quot;color: #0000ff&quot;&gt;this&lt;/span&gt;.ValueType)&lt;br /&gt;                {&lt;br /&gt;                    &lt;span style=&quot;color: #0000ff&quot;&gt;case&lt;/span&gt; TypeExpression.Digito:&lt;br /&gt;                        &lt;span style=&quot;color: #0000ff&quot;&gt;if&lt;/span&gt; (&lt;span style=&quot;color: #0000ff&quot;&gt;string&lt;/span&gt;.IsNullOrEmpty(&lt;span style=&quot;color: #0000ff&quot;&gt;this&lt;/span&gt;.ErrorMessage))&lt;br /&gt;                            &lt;span style=&quot;color: #0000ff&quot;&gt;this&lt;/span&gt;.ErrorMessage = &lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;Somente dígitos.&amp;quot;&lt;/span&gt;;&lt;br /&gt;                        &lt;span style=&quot;color: #0000ff&quot;&gt;this&lt;/span&gt;.ValidationExpression = &lt;span style=&quot;color: #006080&quot;&gt;@&amp;quot;^\d+$&amp;quot;&lt;/span&gt;;&lt;br /&gt;                        &lt;span style=&quot;color: #0000ff&quot;&gt;break&lt;/span&gt;;&lt;br /&gt;                    &lt;span style=&quot;color: #0000ff&quot;&gt;case&lt;/span&gt; TypeExpression.Decimal:&lt;br /&gt;                        &lt;span style=&quot;color: #0000ff&quot;&gt;if&lt;/span&gt; (&lt;span style=&quot;color: #0000ff&quot;&gt;string&lt;/span&gt;.IsNullOrEmpty(&lt;span style=&quot;color: #0000ff&quot;&gt;this&lt;/span&gt;.ErrorMessage))&lt;br /&gt;                            &lt;span style=&quot;color: #0000ff&quot;&gt;this&lt;/span&gt;.ErrorMessage = &lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;Formato decimal inválido.&amp;quot;&lt;/span&gt;;&lt;br /&gt;                        &lt;span style=&quot;color: #0000ff&quot;&gt;this&lt;/span&gt;.ValidationExpression = &lt;span style=&quot;color: #006080&quot;&gt;@&amp;quot;^[+-]?((\d+|\d{1,3}(\.\d{3})+)(\,\d*)?|\,\d+)$&amp;quot;&lt;/span&gt;;&lt;br /&gt;                        &lt;span style=&quot;color: #0000ff&quot;&gt;break&lt;/span&gt;;&lt;br /&gt;                    &lt;span style=&quot;color: #0000ff&quot;&gt;case&lt;/span&gt; TypeExpression.Moeda:&lt;br /&gt;                        &lt;span style=&quot;color: #0000ff&quot;&gt;if&lt;/span&gt; (&lt;span style=&quot;color: #0000ff&quot;&gt;string&lt;/span&gt;.IsNullOrEmpty(&lt;span style=&quot;color: #0000ff&quot;&gt;this&lt;/span&gt;.ErrorMessage))&lt;br /&gt;                            &lt;span style=&quot;color: #0000ff&quot;&gt;this&lt;/span&gt;.ErrorMessage = &lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;Formato moeda inválido.&amp;quot;&lt;/span&gt;;&lt;br /&gt;                        &lt;span style=&quot;color: #0000ff&quot;&gt;this&lt;/span&gt;.ValidationExpression = &lt;span style=&quot;color: #006080&quot;&gt;@&amp;quot;^\d{1,3}(\.\d{3})*\,\d{2}$&amp;quot;&lt;/span&gt;;&lt;br /&gt;                        &lt;span style=&quot;color: #0000ff&quot;&gt;break&lt;/span&gt;;&lt;br /&gt;                    &lt;span style=&quot;color: #0000ff&quot;&gt;case&lt;/span&gt; TypeExpression.Email:&lt;br /&gt;                        &lt;span style=&quot;color: #0000ff&quot;&gt;if&lt;/span&gt; (&lt;span style=&quot;color: #0000ff&quot;&gt;string&lt;/span&gt;.IsNullOrEmpty(&lt;span style=&quot;color: #0000ff&quot;&gt;this&lt;/span&gt;.ErrorMessage))&lt;br /&gt;                            &lt;span style=&quot;color: #0000ff&quot;&gt;this&lt;/span&gt;.ErrorMessage = &lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;Formato e-mail inválido.&amp;quot;&lt;/span&gt;;&lt;br /&gt;                        &lt;span style=&quot;color: #0000ff&quot;&gt;this&lt;/span&gt;.ValidationExpression = &lt;span style=&quot;color: #006080&quot;&gt;@&amp;quot;^([\w\-]+\.)*[\w\- ]+@([\w\- ]+\.)+([\w\-]{2,3})$&amp;quot;&lt;/span&gt;;&lt;br /&gt;                        &lt;span style=&quot;color: #0000ff&quot;&gt;break&lt;/span&gt;;&lt;br /&gt;                    &lt;span style=&quot;color: #0000ff&quot;&gt;case&lt;/span&gt; TypeExpression.Telefone:&lt;br /&gt;                        &lt;span style=&quot;color: #0000ff&quot;&gt;if&lt;/span&gt; (&lt;span style=&quot;color: #0000ff&quot;&gt;string&lt;/span&gt;.IsNullOrEmpty(&lt;span style=&quot;color: #0000ff&quot;&gt;this&lt;/span&gt;.ErrorMessage))&lt;br /&gt;                            &lt;span style=&quot;color: #0000ff&quot;&gt;this&lt;/span&gt;.ErrorMessage = &lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;Formato telefone inválido.&amp;quot;&lt;/span&gt;;&lt;br /&gt;                        &lt;span style=&quot;color: #0000ff&quot;&gt;this&lt;/span&gt;.ValidationExpression = &lt;span style=&quot;color: #006080&quot;&gt;@&amp;quot;^\(\d{3}\)-\d{4}-\d{4}$&amp;quot;&lt;/span&gt;;&lt;br /&gt;                        &lt;span style=&quot;color: #0000ff&quot;&gt;break&lt;/span&gt;;&lt;br /&gt;                }&lt;br /&gt;            }&lt;br /&gt; &lt;br /&gt;            &lt;span style=&quot;color: #008000&quot;&gt;// adiciona controle (se conter expressão) &lt;/span&gt;&lt;br /&gt;            &lt;span style=&quot;color: #0000ff&quot;&gt;if&lt;/span&gt;(!String.IsNullOrEmpty(&lt;span style=&quot;color: #0000ff&quot;&gt;this&lt;/span&gt;.ValidationExpression))&lt;br /&gt;                Controls.Add(_validator);&lt;br /&gt;       }&lt;br /&gt; &lt;br /&gt;       &lt;span style=&quot;color: #008000&quot;&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;&lt;br /&gt;       &lt;span style=&quot;color: #008000&quot;&gt;/// Monta RequiredFieldValidator e adiciona (se campo obrigatorio)&lt;/span&gt;&lt;br /&gt;       &lt;span style=&quot;color: #008000&quot;&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;br /&gt;       &lt;span style=&quot;color: #0000ff&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;void&lt;/span&gt; CreateRequiredFieldValidator()&lt;br /&gt;       {&lt;br /&gt;            &lt;span style=&quot;color: #008000&quot;&gt;// se campo obrigatorio&lt;/span&gt;&lt;br /&gt;            &lt;span style=&quot;color: #0000ff&quot;&gt;if&lt;/span&gt; (&lt;span style=&quot;color: #0000ff&quot;&gt;this&lt;/span&gt;.IsNotNull)&lt;br /&gt;            {&lt;br /&gt;               &lt;span style=&quot;color: #008000&quot;&gt;// cria RequiredFieldValidator e fixa propriedades&lt;/span&gt;&lt;br /&gt;                RequiredFieldValidator _required = &lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; RequiredFieldValidator();&lt;br /&gt;                _required.ControlToValidate = &lt;span style=&quot;color: #0000ff&quot;&gt;this&lt;/span&gt;.ID;&lt;br /&gt;                &lt;span style=&quot;color: #008000&quot;&gt;// ** sugestão: crie uma propriedade para esta &lt;/span&gt;&lt;br /&gt;                &lt;span style=&quot;color: #008000&quot;&gt;// mensagem de erro&lt;/span&gt;&lt;br /&gt;                _required.ErrorMessage = String.Empty;&lt;br /&gt;                _required.Text = &lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;* obrigatorio&amp;quot;&lt;/span&gt;;&lt;br /&gt;                _required.Display = ValidatorDisplay.Dynamic;&lt;br /&gt;                _required.ForeColor = System.Drawing.Color.Red;&lt;br /&gt;                &lt;br /&gt;                &lt;span style=&quot;color: #008000&quot;&gt;// adiciona controle&lt;/span&gt;&lt;br /&gt;                Controls.Add(_required);&lt;br /&gt;            }&lt;br /&gt;       }&lt;br /&gt; &lt;br /&gt;       &lt;span style=&quot;color: #008000&quot;&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;&lt;br /&gt;       &lt;span style=&quot;color: #008000&quot;&gt;/// Monta ValidationSummary e adiciona (se possuir validação)&lt;/span&gt;&lt;br /&gt;       &lt;span style=&quot;color: #008000&quot;&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;br /&gt;       &lt;span style=&quot;color: #0000ff&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;void&lt;/span&gt; CreateSummary()&lt;br /&gt;       {&lt;br /&gt;            &lt;span style=&quot;color: #008000&quot;&gt;// verifica as propriedades obrigatorias&lt;/span&gt;&lt;br /&gt;            &lt;span style=&quot;color: #0000ff&quot;&gt;if&lt;/span&gt; (!String.IsNullOrEmpty(&lt;span style=&quot;color: #0000ff&quot;&gt;this&lt;/span&gt;.ValidationExpression) || &lt;span style=&quot;color: #0000ff&quot;&gt;this&lt;/span&gt;.IsNotNull)&lt;br /&gt;            {&lt;br /&gt;                &lt;span style=&quot;color: #008000&quot;&gt;// contador de verificação dos controles CustomTextBox&lt;/span&gt;&lt;br /&gt;                Int16 count = 0;&lt;br /&gt;                &lt;span style=&quot;color: #008000&quot;&gt;// percorre todos os controles da página&lt;/span&gt;&lt;br /&gt;                &lt;span style=&quot;color: #0000ff&quot;&gt;foreach&lt;/span&gt; (Control _control &lt;span style=&quot;color: #0000ff&quot;&gt;in&lt;/span&gt; Page.Form.Controls)&lt;br /&gt;                {&lt;br /&gt;                    &lt;span style=&quot;color: #008000&quot;&gt;// se controle for do tipo da classe &lt;/span&gt;&lt;br /&gt;                    &lt;span style=&quot;color: #008000&quot;&gt;// personalizada que estamos desenvolvendo&lt;/span&gt;&lt;br /&gt;                    &lt;span style=&quot;color: #0000ff&quot;&gt;if&lt;/span&gt; (_control.GetType() == &lt;span style=&quot;color: #0000ff&quot;&gt;typeof&lt;/span&gt;(CustomTextBox))&lt;br /&gt;                    {&lt;br /&gt;                        &lt;span style=&quot;color: #008000&quot;&gt;// se o objeto está sendo acessado pela &lt;/span&gt;&lt;br /&gt;                        &lt;span style=&quot;color: #008000&quot;&gt;// primeira vez&lt;/span&gt;&lt;br /&gt;                        &lt;span style=&quot;color: #0000ff&quot;&gt;if&lt;/span&gt; (count == 0)&lt;br /&gt;                            &lt;span style=&quot;color: #008000&quot;&gt;// se o controle encontrado é o controle que&lt;/span&gt;&lt;br /&gt;                            &lt;span style=&quot;color: #008000&quot;&gt;// provocou a chamada&lt;/span&gt;&lt;br /&gt;                            &lt;span style=&quot;color: #0000ff&quot;&gt;if&lt;/span&gt; (_control.ID == &lt;span style=&quot;color: #0000ff&quot;&gt;this&lt;/span&gt;.ID)&lt;br /&gt;                            {&lt;br /&gt;                                &lt;span style=&quot;color: #008000&quot;&gt;// cria Summary e fixa propriedades&lt;/span&gt;&lt;br /&gt;                                ValidationSummary _summary = &lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; ValidationSummary();&lt;br /&gt;                                &lt;span style=&quot;color: #008000&quot;&gt;// ** sugestão: preencha esta propriedade&lt;/span&gt;&lt;br /&gt;                                &lt;span style=&quot;color: #008000&quot;&gt;// para mensagem comuns&lt;/span&gt;&lt;br /&gt;                                &lt;span style=&quot;color: #008000&quot;&gt;//_summary.HeaderText = &amp;quot;Verifique os &lt;/span&gt;&lt;br /&gt;                                &lt;span style=&quot;color: #008000&quot;&gt;// campos Obrigatórios.&amp;quot;;&lt;/span&gt;&lt;br /&gt;                                _summary.ShowMessageBox = &lt;span style=&quot;color: #0000ff&quot;&gt;true&lt;/span&gt;;&lt;br /&gt;                                _summary.ShowSummary = &lt;span style=&quot;color: #0000ff&quot;&gt;false&lt;/span&gt;;&lt;br /&gt;                                _summary.ID = &lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;vsTextBox&amp;quot;&lt;/span&gt;;&lt;br /&gt;                                _summary.DisplayMode = ValidationSummaryDisplayMode.List;&lt;br /&gt; &lt;br /&gt;                                &lt;span style=&quot;color: #008000&quot;&gt;// adiciona controles&lt;/span&gt;&lt;br /&gt;                                Controls.Add(_summary);&lt;br /&gt;                            }&lt;br /&gt;                        &lt;span style=&quot;color: #008000&quot;&gt;// incrementa à quantidade de controles do &lt;/span&gt;&lt;br /&gt;                        &lt;span style=&quot;color: #008000&quot;&gt;// tipo CustomTextBox encontrados&lt;/span&gt;&lt;br /&gt;                        count++;&lt;br /&gt;                    }&lt;br /&gt;                }&lt;br /&gt;            }&lt;br /&gt;       }&lt;br /&gt;   }&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;E aqui, a aplicação da Class Library e uma página:&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div id=&quot;codeSnippetWrapper&quot;&gt;&lt;br /&gt;  &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot; id=&quot;codeSnippet&quot;&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;&amp;lt;&lt;/span&gt; %@ Page Language=&amp;quot;VB&amp;quot; AutoEventWireup=&amp;quot;false&amp;quot; CodeFile=&amp;quot;Validation.aspx.vb&amp;quot; Inherits=&amp;quot;Default5&amp;quot; &lt;span style=&quot;background-color: #ffff00&quot;&gt;%&amp;gt;&lt;/span&gt;&lt;br /&gt; &lt;br /&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;&amp;lt;&lt;/span&gt; %@ Register Assembly=&amp;quot;CustomControls&amp;quot; Namespace=&amp;quot;CustomControls&amp;quot; TagPrefix=&amp;quot;cc1&amp;quot; &lt;span style=&quot;background-color: #ffff00&quot;&gt;%&amp;gt;&lt;/span&gt;&lt;br /&gt; &lt;br /&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;&amp;lt;&lt;/span&gt; !DOCTYPE html PUBLIC &amp;quot; -//W3C//DTD XHTML 1.0 Transitional//EN&amp;quot; &amp;quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&amp;quot; &lt;span style=&quot;color: #0000ff&quot;&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt; &lt;br /&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;&amp;lt;&lt;/span&gt; html xmlns=&amp;quot;http://www.w3.org/1999/xhtml&amp;quot; &lt;span style=&quot;color: #0000ff&quot;&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;&amp;lt;&lt;/span&gt; head runat=&amp;quot;server&amp;quot; &lt;span style=&quot;color: #0000ff&quot;&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;   &lt;span style=&quot;color: #0000ff&quot;&gt;&amp;lt;&lt;/span&gt; title&lt;span style=&quot;color: #0000ff&quot;&gt;&amp;gt;&lt;/span&gt;Untitled Page&lt;span style=&quot;color: #0000ff&quot;&gt;&amp;lt;&lt;/span&gt; /title&lt;span style=&quot;color: #0000ff&quot;&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;&amp;lt;&lt;/span&gt; /head&lt;span style=&quot;color: #0000ff&quot;&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;&amp;lt;&lt;/span&gt; body&lt;span style=&quot;color: #0000ff&quot;&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;   &lt;span style=&quot;color: #0000ff&quot;&gt;&amp;lt;&lt;/span&gt; form id=&amp;quot;form1&amp;quot; runat=&amp;quot;server&amp;quot; &lt;span style=&quot;color: #0000ff&quot;&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;   &lt;span style=&quot;color: #0000ff&quot;&gt;&amp;lt;&lt;/span&gt; div&lt;span style=&quot;color: #0000ff&quot;&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;       &lt;span style=&quot;color: #0000ff&quot;&gt;&amp;lt;&lt;/span&gt; !-- campo obrigatorio --&lt;span style=&quot;color: #0000ff&quot;&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;       &lt;span style=&quot;color: #0000ff&quot;&gt;&amp;lt;&lt;/span&gt; cc1:CustomTextBox ID=&amp;quot;CustomTextBox1&amp;quot; runat=&amp;quot;server&amp;quot; IsNotNull=&amp;quot;true&amp;quot; &lt;span style=&quot;color: #0000ff&quot;&gt;/&amp;gt;&amp;lt;&lt;/span&gt; br &lt;span style=&quot;color: #0000ff&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;       &lt;span style=&quot;color: #0000ff&quot;&gt;&amp;lt;&lt;/span&gt; !-- campo obrigatorio e somente dígito --&lt;span style=&quot;color: #0000ff&quot;&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;       &lt;span style=&quot;color: #0000ff&quot;&gt;&amp;lt;&lt;/span&gt; cc1:CustomTextBox ID=&amp;quot;CustomTextBox2&amp;quot; runat=&amp;quot;server&amp;quot; ValueType=&amp;quot;Digito&amp;quot; Display=&amp;quot;None&amp;quot; IsNotNull=&amp;quot;true&amp;quot; &lt;span style=&quot;color: #0000ff&quot;&gt;/&amp;gt;&amp;lt;&lt;/span&gt; br &lt;span style=&quot;color: #0000ff&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;       &lt;span style=&quot;color: #0000ff&quot;&gt;&amp;lt;&lt;/span&gt; !-- campo não obrigatorio com validaç ão de e-mail e mensagem de erro externo --&lt;span style=&quot;color: #0000ff&quot;&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;       &lt;span style=&quot;color: #0000ff&quot;&gt;&amp;lt;&lt;/span&gt; cc1:CustomTextBox ID=&amp;quot;CustomTextBox3&amp;quot; runat=&amp;quot;server&amp;quot; ValueType=&amp;quot;Email&amp;quot; Display=&amp;quot;Dynamic&amp;quot; ErrorMessage=&amp;quot;E-mail inválido&amp;quot; &lt;span style=&quot;color: #0000ff&quot;&gt;/&amp;gt;&amp;lt;&lt;/span&gt; br &lt;span style=&quot;color: #0000ff&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;       &lt;span style=&quot;color: #0000ff&quot;&gt;&amp;lt;&lt;/span&gt; !-- campo não obrigatorio com validaç ão de telefone e mensagem de erro interna --&lt;span style=&quot;color: #0000ff&quot;&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;       &lt;span style=&quot;color: #0000ff&quot;&gt;&amp;lt;&lt;/span&gt; cc1:CustomTextBox ID=&amp;quot;CustomTextBox4&amp;quot; runat=&amp;quot;server&amp;quot; ValueType=&amp;quot;Telefone&amp;quot; Display=&amp;quot;Static&amp;quot; &lt;span style=&quot;color: #0000ff&quot;&gt;/&amp;gt;&amp;lt;&lt;/span&gt; br &lt;span style=&quot;color: #0000ff&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;       &lt;span style=&quot;color: #0000ff&quot;&gt;&amp;lt;&lt;/span&gt; asp:Button ID=&amp;quot;Button1&amp;quot; runat=&amp;quot;server&amp;quot; Text=&amp;quot;Button&amp;quot; &lt;span style=&quot;color: #0000ff&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;   &lt;span style=&quot;color: #0000ff&quot;&gt;&amp;lt;&lt;/span&gt; /div&lt;span style=&quot;color: #0000ff&quot;&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;   &lt;span style=&quot;color: #0000ff&quot;&gt;&amp;lt;&lt;/span&gt; /form&lt;span style=&quot;color: #0000ff&quot;&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;&amp;lt;&lt;/span&gt; /body&lt;span style=&quot;color: #0000ff&quot;&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;&amp;lt;&lt;/span&gt; /html&lt;span style=&quot;color: #0000ff&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;em&gt;Fonte: &lt;/em&gt;&lt;a title=&quot;DevMedia&quot; href=&quot;http://www.devmedia.com.br/articles/viewcomp.asp?comp=6623&quot; target=&quot;_blank&quot;&gt;&lt;em&gt;DevMedia&lt;/em&gt;&lt;/a&gt;&lt;/div&gt;  </content><link rel='replies' type='application/atom+xml' href='http://edipooliveira.blogspot.com/feeds/8148306209992936481/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://edipooliveira.blogspot.com/2011/05/criando-controles-de-servidor.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4892576122733604611/posts/default/8148306209992936481'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4892576122733604611/posts/default/8148306209992936481'/><link rel='alternate' type='text/html' href='http://edipooliveira.blogspot.com/2011/05/criando-controles-de-servidor.html' title='Criando Controles de Servidor Personalizados com Validação'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/06382455493229615250</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4892576122733604611.post-9156198621289096979</id><published>2011-03-07T02:48:00.001-03:00</published><updated>2011-03-07T10:51:37.116-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term=".NET"/><title type='text'>Formatar dinheiro R$</title><content type='html'>&lt;p&gt;Para exibir na forma de String uma variável float ou decimal basta aplicar as regras do &lt;a title=&quot;String.Format&quot; href=&quot;http://edipooliveira.blogspot.com/2009/05/formatar-string.html&quot; target=&quot;_blank&quot;&gt;String.Format&lt;/a&gt; com a utilização de duas casas decimais.&lt;/p&gt;  &lt;p&gt;Abaixo um exemplo de como pode ser formatado:&lt;/p&gt;  &lt;p&gt;   &lt;div id=&quot;codeSnippetWrapper&quot;&gt;     &lt;div id=&quot;codeSnippetWrapper&quot;&gt;       &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot; id=&quot;codeSnippet&quot;&gt;System.Globalization.CultureInfo culturaBrasileira = &lt;br /&gt;    &lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; System.Globalization.CultureInfo(&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;pt-BR&amp;quot;&lt;/span&gt;);&lt;br /&gt;String dinheiroFormatado = String.Empty;&lt;br /&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;float&lt;/span&gt; dinheiro = 45612.54F;&lt;br /&gt;&lt;br /&gt;dinheiroFormatado = String.Format(culturaBrasileira, &lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;R$ {0:F2}&amp;quot;&lt;/span&gt;, dinheiro);&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;      &lt;br /&gt;&lt;/div&gt;&lt;br /&gt;  &lt;/div&gt;&lt;/p&gt;  </content><link rel='replies' type='application/atom+xml' href='http://edipooliveira.blogspot.com/feeds/9156198621289096979/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://edipooliveira.blogspot.com/2011/03/formatar-dinheiro-r.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4892576122733604611/posts/default/9156198621289096979'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4892576122733604611/posts/default/9156198621289096979'/><link rel='alternate' type='text/html' href='http://edipooliveira.blogspot.com/2011/03/formatar-dinheiro-r.html' title='Formatar dinheiro R$'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/06382455493229615250</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4892576122733604611.post-8152080647422829389</id><published>2011-03-07T02:31:00.001-03:00</published><updated>2011-03-07T02:31:49.268-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term=".NET"/><title type='text'>Customização RadioButtonList</title><content type='html'>&lt;p&gt;O controle RadioButtonList gera uma série de tags HTML que para o desenvolvimento do CSS acaba dificultando sua estilização. Além disso, semânticamente o HTML gerado deveria ser baseado em UL (&amp;lt;UL&amp;gt;) e LI (&amp;lt;LI&amp;gt;).&lt;/p&gt;  &lt;p&gt;Assim como na &lt;a title=&quot;Customização do UpdatePanel&quot; href=&quot;http://edipooliveira.blogspot.com/2011/03/customizacao-updatepanel.html&quot; target=&quot;_blank&quot;&gt;customização do updatepanel&lt;/a&gt;, basta sobrescrever o método responsável pela geração do HTML. Neste caso, o método &lt;strong&gt;Render&lt;/strong&gt;.&lt;/p&gt;  &lt;p&gt;Abaixo tem um exemplo:&lt;/p&gt;  &lt;div id=&quot;codeSnippetWrapper&quot;&gt;   &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot; id=&quot;codeSnippet&quot;&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;using&lt;/span&gt; System;&lt;br /&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;using&lt;/span&gt; System.Collections.Generic;&lt;br /&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;using&lt;/span&gt; System.ComponentModel;&lt;br /&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;using&lt;/span&gt; System.Text;&lt;br /&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;using&lt;/span&gt; System.Web;&lt;br /&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;using&lt;/span&gt; System.Web.UI;&lt;br /&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;using&lt;/span&gt; System.Web.UI.WebControls;&lt;br /&gt; &lt;br /&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;namespace&lt;/span&gt; Customizado.ControlLibrary&lt;br /&gt;{&lt;br /&gt;       [ToolboxData(&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;&amp;lt;{0}:CustomizadoRadioButtonList runat=server&amp;gt;&amp;lt;/{0}:CustomizadoRadioButtonList&amp;gt;&amp;quot;&lt;/span&gt;)]&lt;br /&gt;       &lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;class&lt;/span&gt; CustomizadoRadioButtonList : System.Web.UI.WebControls.RadioButtonList&lt;br /&gt;       {&lt;br /&gt;             &lt;span style=&quot;color: #0000ff&quot;&gt;protected&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;override&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;void&lt;/span&gt; Render(HtmlTextWriter writer)&lt;br /&gt;             {&lt;br /&gt;                    &lt;span style=&quot;color: #008000&quot;&gt;// We start our un-ordered list tag.&lt;/span&gt;&lt;br /&gt;                    writer.WriteBeginTag(&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;ul&amp;quot;&lt;/span&gt;);&lt;br /&gt; &lt;br /&gt;                    &lt;span style=&quot;color: #008000&quot;&gt;// If the CssClass property has been assigned, we will add&lt;/span&gt;&lt;br /&gt;                    &lt;span style=&quot;color: #008000&quot;&gt;// the attribute here in our &amp;lt;ul&amp;gt; tag.&lt;/span&gt;&lt;br /&gt;                    &lt;span style=&quot;color: #0000ff&quot;&gt;if&lt;/span&gt; (&lt;span style=&quot;color: #0000ff&quot;&gt;this&lt;/span&gt;.CssClass.Length &amp;gt; 0)&lt;br /&gt;                    {&lt;br /&gt;                           writer.WriteAttribute(&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;class&amp;quot;&lt;/span&gt;, &lt;span style=&quot;color: #0000ff&quot;&gt;this&lt;/span&gt;.CssClass);&lt;br /&gt;                    }&lt;br /&gt; &lt;br /&gt;                    &lt;span style=&quot;color: #008000&quot;&gt;// We need to close off the &amp;lt;ul&amp;gt; tag, but we are not ready&lt;/span&gt;&lt;br /&gt;                    &lt;span style=&quot;color: #008000&quot;&gt;// to add the closing &amp;lt;/ul&amp;gt; tag yet.&lt;/span&gt;&lt;br /&gt;                    writer.Write(&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;&amp;gt;&amp;quot;&lt;/span&gt;);&lt;br /&gt; &lt;br /&gt;                    &lt;span style=&quot;color: #008000&quot;&gt;// Now we will render each child item, which in this case&lt;/span&gt;&lt;br /&gt;                    &lt;span style=&quot;color: #008000&quot;&gt;// would be our checkboxes.&lt;/span&gt;&lt;br /&gt;                    &lt;span style=&quot;color: #0000ff&quot;&gt;for&lt;/span&gt; (&lt;span style=&quot;color: #0000ff&quot;&gt;int&lt;/span&gt; i = 0; i &amp;lt; &lt;span style=&quot;color: #0000ff&quot;&gt;this&lt;/span&gt;.Items.Count; i++)&lt;br /&gt;                    {&lt;br /&gt;                           &lt;span style=&quot;color: #008000&quot;&gt;// We start the &amp;lt;li&amp;gt; (list item) tag.&lt;/span&gt;&lt;br /&gt;                           writer.WriteFullBeginTag(&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;li&amp;quot;&lt;/span&gt;);&lt;br /&gt; &lt;br /&gt;                           &lt;span style=&quot;color: #0000ff&quot;&gt;this&lt;/span&gt;.RenderItem(ListItemType.Item, i, &lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; RepeatInfo(), writer);&lt;br /&gt; &lt;br /&gt;                           &lt;span style=&quot;color: #008000&quot;&gt;// Close the list item tag. Some people think this is not&lt;/span&gt;&lt;br /&gt;                           &lt;span style=&quot;color: #008000&quot;&gt;// necessary, but it is for both XHTML and semantic reasons.&lt;/span&gt;&lt;br /&gt;                           writer.WriteEndTag(&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;li&amp;quot;&lt;/span&gt;);&lt;br /&gt;                    }&lt;br /&gt; &lt;br /&gt;                    &lt;span style=&quot;color: #008000&quot;&gt;// We finish off by closing our un-ordered list tag.&lt;/span&gt;&lt;br /&gt;                    writer.WriteEndTag(&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;ul&amp;quot;&lt;/span&gt;);&lt;br /&gt;             }&lt;br /&gt;       }&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;em&gt;Fonte: &lt;/em&gt;&lt;a href=&quot;http://www.singingeels.com/Articles/Semantic_CheckBoxList__RadioButtonList.aspx&quot;&gt;&lt;em&gt;http://www.singingeels.com/Articles/Semantic_CheckBoxList__RadioButtonList.aspx&lt;/em&gt;&lt;/a&gt;&lt;/p&gt;  </content><link rel='replies' type='application/atom+xml' href='http://edipooliveira.blogspot.com/feeds/8152080647422829389/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://edipooliveira.blogspot.com/2011/03/customizacao-radiobuttonlist.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4892576122733604611/posts/default/8152080647422829389'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4892576122733604611/posts/default/8152080647422829389'/><link rel='alternate' type='text/html' href='http://edipooliveira.blogspot.com/2011/03/customizacao-radiobuttonlist.html' title='Customização RadioButtonList'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/06382455493229615250</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4892576122733604611.post-3962762773882580946</id><published>2011-03-07T02:09:00.001-03:00</published><updated>2011-03-07T02:09:58.369-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term=".NET"/><category scheme="http://www.blogger.com/atom/ns#" term="Ajax"/><title type='text'>Customização UpdatePanel</title><content type='html'>&lt;p&gt;Para personalizar a tag HTML que é gerada pelo update panel, basta sobrescrever o método &lt;strong&gt;RenderChildren&lt;/strong&gt;.&lt;/p&gt;  &lt;p&gt;Abaixo tem um exemplo baseado de um post estraído do &lt;a href=&quot;http://weblogs.asp.net&quot;&gt;http://weblogs.asp.net&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Pode-se customizar até mesmo a classe que será utlizado no elemento do UpdatePanel.&lt;/p&gt;    &lt;div id=&quot;codeSnippetWrapper&quot;&gt;   &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot; id=&quot;codeSnippet&quot;&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;using&lt;/span&gt; System;&lt;br /&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;using&lt;/span&gt; System.Collections.Generic;&lt;br /&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;using&lt;/span&gt; System.ComponentModel;&lt;br /&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;using&lt;/span&gt; System.Text;&lt;br /&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;using&lt;/span&gt; System.Web;&lt;br /&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;using&lt;/span&gt; System.Web.UI;&lt;br /&gt; &lt;br /&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;namespace&lt;/span&gt; Customizado.ControlLibrary&lt;br /&gt;{&lt;br /&gt;       [ToolboxData(&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;&amp;lt;{0}:CustomizadoUpdatepanel runat=server&amp;gt;&amp;lt;/{0}:CustomizadoUpdatepanel&amp;gt;&amp;quot;&lt;/span&gt;)]&lt;br /&gt;       &lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;class&lt;/span&gt; CustomizadoUpdatepanel : System.Web.UI.UpdatePanel&lt;br /&gt;       {&lt;br /&gt;             &lt;span style=&quot;color: #0000ff&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;string&lt;/span&gt; cssClass;&lt;br /&gt;             &lt;span style=&quot;color: #0000ff&quot;&gt;private&lt;/span&gt; HtmlTextWriterTag elemento = HtmlTextWriterTag.Div;&lt;br /&gt; &lt;br /&gt;             [DefaultValue(&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;&amp;quot;&lt;/span&gt;)]&lt;br /&gt;             [Description(&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;Applies a CSS style to the panel.&amp;quot;&lt;/span&gt;)]&lt;br /&gt;             &lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;string&lt;/span&gt; CssClass&lt;br /&gt;             {&lt;br /&gt;                    get&lt;br /&gt;                    {&lt;br /&gt;                           &lt;span style=&quot;color: #0000ff&quot;&gt;return&lt;/span&gt; cssClass ?? String.Empty;&lt;br /&gt;                    }&lt;br /&gt;                    set&lt;br /&gt;                    {&lt;br /&gt;                           cssClass = &lt;span style=&quot;color: #0000ff&quot;&gt;value&lt;/span&gt;;&lt;br /&gt;                    }&lt;br /&gt;             }&lt;br /&gt; &lt;br /&gt;             &lt;span style=&quot;color: #008000&quot;&gt;// Hide the base class&#39;s RenderMode property since we don&#39;t use it&lt;/span&gt;&lt;br /&gt;             [Browsable(&lt;span style=&quot;color: #0000ff&quot;&gt;false&lt;/span&gt;)]&lt;br /&gt;             [EditorBrowsable(EditorBrowsableState.Never)]&lt;br /&gt;             [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]&lt;br /&gt;             &lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; UpdatePanelRenderMode ModoRenderizar&lt;br /&gt;             {&lt;br /&gt;                    get&lt;br /&gt;                    {&lt;br /&gt;                           &lt;span style=&quot;color: #0000ff&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;base&lt;/span&gt;.RenderMode;&lt;br /&gt;                    }&lt;br /&gt;                    set&lt;br /&gt;                    {&lt;br /&gt;                           &lt;span style=&quot;color: #0000ff&quot;&gt;base&lt;/span&gt;.RenderMode = &lt;span style=&quot;color: #0000ff&quot;&gt;value&lt;/span&gt;;&lt;br /&gt;                    }&lt;br /&gt;             }&lt;br /&gt; &lt;br /&gt;             [DefaultValue(HtmlTextWriterTag.Div)]&lt;br /&gt;             [Description(&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;A tag para renderizar o painel&amp;quot;&lt;/span&gt;)]&lt;br /&gt;             &lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; HtmlTextWriterTag Elemento&lt;br /&gt;             {&lt;br /&gt;                    get&lt;br /&gt;                    {&lt;br /&gt;                           &lt;span style=&quot;color: #0000ff&quot;&gt;return&lt;/span&gt; elemento;&lt;br /&gt;                    }&lt;br /&gt;                    set&lt;br /&gt;                    {&lt;br /&gt;                           elemento = &lt;span style=&quot;color: #0000ff&quot;&gt;value&lt;/span&gt;;&lt;br /&gt;                    }&lt;br /&gt;             }&lt;br /&gt; &lt;br /&gt;             &lt;span style=&quot;color: #0000ff&quot;&gt;protected&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;override&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;void&lt;/span&gt; RenderChildren(HtmlTextWriter escrever)&lt;br /&gt;             {&lt;br /&gt;                    &lt;span style=&quot;color: #0000ff&quot;&gt;if&lt;/span&gt; (IsInPartialRendering)&lt;br /&gt;                    {&lt;br /&gt;                           &lt;span style=&quot;color: #008000&quot;&gt;// If the UpdatePanel is rendering in &amp;quot;partial&amp;quot; mode that means&lt;/span&gt;&lt;br /&gt;                           &lt;span style=&quot;color: #008000&quot;&gt;// it&#39;s the top-level UpdatePanel in this part of the page, so&lt;/span&gt;&lt;br /&gt;                           &lt;span style=&quot;color: #008000&quot;&gt;// it doesn&#39;t render its outer tag. We just delegate to the base&lt;/span&gt;&lt;br /&gt;                           &lt;span style=&quot;color: #008000&quot;&gt;// class to do all the work.&lt;/span&gt;&lt;br /&gt;                           &lt;span style=&quot;color: #0000ff&quot;&gt;base&lt;/span&gt;.RenderChildren(escrever);&lt;br /&gt;                    }&lt;br /&gt;                    &lt;span style=&quot;color: #0000ff&quot;&gt;else&lt;/span&gt;&lt;br /&gt;                    {&lt;br /&gt;                           &lt;span style=&quot;color: #008000&quot;&gt;// If we&#39;re rendering in normal HTML mode we do all the new custom&lt;/span&gt;&lt;br /&gt;                           &lt;span style=&quot;color: #008000&quot;&gt;// rendering. We then go render our children, which is what the&lt;/span&gt;&lt;br /&gt;                           &lt;span style=&quot;color: #008000&quot;&gt;// normal control&#39;s behavior is.&lt;/span&gt;&lt;br /&gt;                           escrever.AddAttribute(HtmlTextWriterAttribute.Id, ClientID);&lt;br /&gt;                           &lt;span style=&quot;color: #0000ff&quot;&gt;if&lt;/span&gt; (CssClass.Length &amp;gt; 0)&lt;br /&gt;                           {&lt;br /&gt;                                  escrever.AddAttribute(HtmlTextWriterAttribute.Class, CssClass);&lt;br /&gt;                           }&lt;br /&gt;                           escrever.RenderBeginTag(Elemento);&lt;br /&gt;                           &lt;span style=&quot;color: #0000ff&quot;&gt;foreach&lt;/span&gt; (Control filho &lt;span style=&quot;color: #0000ff&quot;&gt;in&lt;/span&gt; Controls)&lt;br /&gt;                           {&lt;br /&gt;                                  filho.RenderControl(escrever);&lt;br /&gt;                           }&lt;br /&gt;                           escrever.RenderEndTag();&lt;br /&gt;                    }&lt;br /&gt;             }&lt;br /&gt;       }&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;em&gt;Fonte: &lt;/em&gt;&lt;a href=&quot;http://weblogs.asp.net/leftslipper/archive/2006/12/06/customizing-the-rendering-of-the-updatepanel.aspx&quot;&gt;&lt;em&gt;http://weblogs.asp.net/leftslipper/archive/2006/12/06/customizing-the-rendering-of-the-updatepanel.aspx&lt;/em&gt;&lt;/a&gt;&lt;/div&gt;  </content><link rel='replies' type='application/atom+xml' href='http://edipooliveira.blogspot.com/feeds/3962762773882580946/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://edipooliveira.blogspot.com/2011/03/customizacao-updatepanel.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4892576122733604611/posts/default/3962762773882580946'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4892576122733604611/posts/default/3962762773882580946'/><link rel='alternate' type='text/html' href='http://edipooliveira.blogspot.com/2011/03/customizacao-updatepanel.html' title='Customização UpdatePanel'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/06382455493229615250</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4892576122733604611.post-4237902406270025826</id><published>2011-03-02T09:15:00.003-03:00</published><updated>2011-03-02T11:09:44.975-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term=".NET"/><title type='text'>Yield - Retornar uma instância do tipo IEnumerable ou IEnumerator</title><content type='html'>&lt;p&gt;O Yield é utilizado para retornar uma instância do tipo IEnumerable ou IEnumerator, em casos que eu tenho um método que retorne vários valores, o ganho de performance é considerável se você tem uma coleção de dados extensa, observe abaixo:&lt;/p&gt;  &lt;p&gt;Confira abaixo como utilizar o yield:&lt;/p&gt;  &lt;div id=&quot;codeSnippetWrapper&quot;&gt;   &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot; id=&quot;codeSnippet&quot;&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;class&lt;/span&gt; Program&lt;br /&gt;{&lt;br /&gt;    &lt;span style=&quot;color: #0000ff&quot;&gt;static&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;void&lt;/span&gt; Main(&lt;span style=&quot;color: #0000ff&quot;&gt;string&lt;/span&gt;[] args)&lt;br /&gt;    {&lt;br /&gt;         &lt;span style=&quot;color: #0000ff&quot;&gt;foreach&lt;/span&gt; (&lt;span style=&quot;color: #0000ff&quot;&gt;int&lt;/span&gt; num &lt;span style=&quot;color: #0000ff&quot;&gt;in&lt;/span&gt; ObterLista())&lt;br /&gt;         {&lt;br /&gt;              Console.WriteLine(num);&lt;br /&gt;         }&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    &lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;static&lt;/span&gt; IEnumerable ObterLista()&lt;br /&gt;    {&lt;br /&gt;         &lt;span style=&quot;color: #0000ff&quot;&gt;for&lt;/span&gt; (&lt;span style=&quot;color: #0000ff&quot;&gt;int&lt;/span&gt; i = 0; i &amp;lt; 100; i++)&lt;br /&gt;         {&lt;br /&gt;              &lt;span style=&quot;color: #0000ff&quot;&gt;yield&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;return&lt;/span&gt; i;&lt;br /&gt;         }&lt;br /&gt;    }&lt;br /&gt;}&lt;/pre&gt;  &lt;/div&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;div id=&quot;codeSnippetWrapper&quot;&gt;  &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot; id=&quot;codeSnippet&quot;&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; IEnumerable GetImpares_Yield(Int32 maxNum)&lt;br /&gt;{&lt;br /&gt;    &lt;span style=&quot;color: #0000ff&quot;&gt;int&lt;/span&gt; num = 0;&lt;br /&gt;&lt;br /&gt;    &lt;span style=&quot;color: #0000ff&quot;&gt;while&lt;/span&gt; (&lt;span style=&quot;color: #0000ff&quot;&gt;true&lt;/span&gt;)&lt;br /&gt;    {&lt;br /&gt;         System.Threading.Thread.Sleep(1000);&lt;br /&gt;         num++;&lt;br /&gt;&lt;br /&gt;         &lt;span style=&quot;color: #0000ff&quot;&gt;if&lt;/span&gt; (num % 2 == 1)&lt;br /&gt;              &lt;span style=&quot;color: #0000ff&quot;&gt;yield&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;return&lt;/span&gt; num;&lt;br /&gt;&lt;br /&gt;         &lt;span style=&quot;color: #0000ff&quot;&gt;if&lt;/span&gt; (num &amp;gt;= maxNum)&lt;br /&gt;              &lt;span style=&quot;color: #0000ff&quot;&gt;yield&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;break&lt;/span&gt;;&lt;br /&gt;    }&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;p&gt;&lt;em&gt;Créditos: &lt;/em&gt;&lt;a title=&quot;http://devrs.net/post/desmistificando-o-yield/&quot; href=&quot;http://devrs.net/post/desmistificando-o-yield/&quot;&gt;&lt;em&gt;http://devrs.net/post/desmistificando-o-yield/&lt;/em&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://edipooliveira.blogspot.com/feeds/4237902406270025826/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://edipooliveira.blogspot.com/2011/03/yield-ienumerable-ienumerator.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4892576122733604611/posts/default/4237902406270025826'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4892576122733604611/posts/default/4237902406270025826'/><link rel='alternate' type='text/html' href='http://edipooliveira.blogspot.com/2011/03/yield-ienumerable-ienumerator.html' title='Yield - Retornar uma instância do tipo IEnumerable ou IEnumerator'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/06382455493229615250</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>