LogName 0 Denunciar post Postado Agosto 3, 2008 Meninos, Trabalho atualmente com ASP, mas com a migração dos servidores daqui da empresa estão querendo que migre os sistemas para ASP.NET, tanto os sistemas em Web quanto os em vb 6, então para não perder o emprego queria muito a ajuda de vocês para entender de vez como migrar para .NET (vb). http://forum.imasters.com.br/public/style_emoticons/default/blush.gif Assim, já tentei encontrar tópicos sobre Migrar Asp para Asp.NET, todos bons, mas nenhum direcional a minha dificuldade. Baixei o Visual Studio 2008 e também uma ferramenta de migração do site asp.net mas não funcionou, acho que ela foi feita para Visual Studio 2003. http://forum.imasters.com.br/public/style_emoticons/default/excl.gif Tentei fazer manualmente e também outra dificuldade pois o topicos que encontro ficam mesclando entra .net 1.0, 2.0 e outros 3.5, agora me perdi toda. http://forum.imasters.com.br/public/style_emoticons/default/cry.gif E eu não sou loira! ;) Alguem poderia me ajudar por exemplo com este código (simples em asp), mas que contem toda base que preciso (acredito): <%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%> <% Option Explicit Response.AddHeader "Pragma", "no-cache" Response.Buffer = True Response.CacheControl = "no-cache" Response.Expires = -1500 Response.ExpiresAbsolute = now() Session.LCID = 1046 Session.Timeout = 20 'Caracter %><!--#include file="funcoes/inc/caracter.inc"--><% 'Configuracoes Dim vDomain, vHead vDomain = "localhost" 'meudominio.com.br 'Links Dim vServer, vLink, vPagina, vTitle vTitle = "Migrando de Asp para Asp.NET" vServer = "http://"& Request.ServerVariables("SERVER_NAME") vLink = "http://"& Request.ServerVariables("SERVER_NAME") & request.ServerVariables("URL") if request.ServerVariables("QUERY_STRING") <> empty then vLink = vLink &"?"& request.ServerVariables("QUERY_STRING") vPagina = Replace(Request.ServerVariables("URL"),".asp",Empty) 'Links Funcoes Dim vFuncoes, vAsp, vCss, vJs, vSwf vFuncoes = vServer &"funcoes/" vAsp = vFuncoes &"asp/" vCss = vFuncoes &"css/" vJs = vFuncoes &"js/" vSwf = vFuncoes &"swf/" 'Links Imagens Dim vImagens, vGif, vJpg, vIco, vPng vImagens = vServer &"imagens/" vGif = vImagens &"gif/" vJpg = vImagens &"jpg/" vIco = vImagens &"ico/" vPng = vImagens &"png/" 'Informacoes da Pagina Dim vCopyright, vDescription, vKeywords vCopyright = "Aqui vai as descrições de Copyright para facilitar no RSS e SEO" vDescription = "Aqui vai as descrições de Copyright para facilitar no RSS e SEO" vKeywords = "Aqui vai as descrições de Copyright para facilitar no RSS e SEO" 'Descarrega a medida que constroi Response.Flush() 'Cabecalho pagina Response.Write("<?xml version=""1.0"" encoding=""iso-8859-1""?>"& vbcrlf) Response.Write("<!DOCTYPE html PUBLIC ""-//W3C//DTD XHTML 1.0 Transitional//EN"" ""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"">"& vbcrlf) Response.Write("<html xmlns=""http://www.w3.org/1999/xhtml"" xml:lang=""pt"" lang=""pt"">"& vbcrlf) Response.Write(" <head>"& vbcrlf) Response.Write(" <title>"& fncCharOut(vTitle) &"</title>"& vbcrlf) Response.Write(" <meta http-equiv=""charset"" content=""ISO-8859-1""/>"& vbcrlf) Response.Write(" <meta http-equiv=""conteudo-language"" content=""Portuguese""/>"& vbcrlf) Response.Write(" <meta http-equiv=""conteudo-type"" content=""application/xhtml+xml; charset=iso-8859-1""/>"& vbcrlf) Response.Write(" <meta http-equiv=""expires"" content=""never""/>"& vbcrlf) Response.Write(" <meta http-equiv=""imagetoolbar"" content=""no""/>"& vbcrlf) Response.Write(" <meta http-equiv=""pragma"" content=""no-cache""/>"& vbcrlf) Response.Write(" <meta http-equiv=""revisit-after"" content=""3 days""/>"& vbcrlf) Response.Write(" <meta name=""author"" content=""Lois Oliveira Gonzaga""/>"& vbcrlf) Response.Write(" <meta name=""copyright"" content="""& fncCharOut(vCopyright) &"""/>"& vbcrlf) Response.Write(" <meta name=""dc.language"" content=""pt-br""/>"& vbcrlf) Response.Write(" <meta name=""description"" content="""& fncCharOut(vDescription) &"""/>"& vbcrlf) Response.Write(" <meta name=""distribution"" content=""global""/>"& vbcrlf) Response.Write(" <meta name=""expires"" content=""never""/>"& vbcrlf) Response.Write(" <meta name=""generator"" content="""& fncCharOut(vTitle) &" - v.9""/>"& vbcrlf) Response.Write(" <meta name=""googlebot"" content=""all""/>"& vbcrlf) Response.Write(" <meta name=""language"" content=""pt-br""/>"& vbcrlf) Response.Write(" <meta name=""keywords"" content="""& fncCharOut(vKeywords) &"""/>"& vbcrlf) Response.Write(" <meta name=""MSSmartTagsPreventParsing"" content=""true""/>"& vbcrlf) Response.Write(" <meta name=""rating"" content=""general""/>"& vbcrlf) Response.Write(" <meta name=""revisit-after"" content=""3 days""/>"& vbcrlf) Response.Write(" <meta name=""robots"" content=""all""/>"& vbcrlf) Response.Write(" <meta name=""title"" content="""& fncCharOut(vTitle) &"""/>"& vbcrlf) Response.Write(" <meta name=""url"" content="""& vDomain &"""/>"& vbcrlf) Response.Write(" <link rel=""shortcut icon"" href="""& vIco &"favicon.ico""/>"& vbcrlf) Response.Write(" <link rel=""stylesheet"" href="""& vCss &"tela.css"" type=""text/css""/>"& vbcrlf) Response.Write(vHead) Response.Write(" </head>"& vbcrlf) Response.Write(" <body>"& vbcrlf) Response.Write(" <div id=""estrutura"">"& vbcrlf) Response.Write(" <div id=""superior"">Aqui viria cabecalho</div>"& vbcrlf) Response.Write(" <div id=""conteudo"">Aqui vem o conteudo somente desta pagina dentro do fncCharOut</div>"& vbcrlf) Response.Write(" <div id=""rodape"">"& vbcrlf) Response.Write(" <a href=""http://validator.w3.org/check?uri=referer"" target=""_blank"" title=""Validação desta página conforme o padrão W3C/XHTML"">Validação XHTML</a> | "& vbcrlf) Response.Write(" <a href=""http://jigsaw.w3.org/css-validator/check/referer"" target=""_blank"" title=""Validação desta página conforme o padrão W3C/CSS"">Validação CSS</a>"& vbcrlf) Response.Write(" </div>"& vbcrlf) Response.Write(" </div>"& vbcrlf) Response.Write(" <noscript>O Browser não suporta o script escrito, atualize para Microsoft Internet Explorer 7, Mozilla Firefox 1.3, Opera 8.1, Safari 2.5 ou Flock 1.0, todos nestas versões ou superiores</noscript>"& vbcrlf) Response.Write(" </body>"& vbcrlf) Response.Write("</html>"& vbcrlf) %> Arquivo de include (caracter.inc): <% Function fncCharOut(vCharOut) if vCharOut <> empty then vCharOut = Replace(vCharOut,"""""",""") if vCharOut <> empty then vCharOut = Replace(vCharOut,"·","·") if vCharOut <> empty then vCharOut = Replace(vCharOut,"&","&") if vCharOut <> empty then vCharOut = Replace(vCharOut,"´","´") if vCharOut <> empty then vCharOut = Replace(vCharOut,"Á","Á") if vCharOut <> empty then vCharOut = Replace(vCharOut,"á","á") if vCharOut <> empty then vCharOut = Replace(vCharOut,"Â","Â") if vCharOut <> empty then vCharOut = Replace(vCharOut,"â","â") if vCharOut <> empty then vCharOut = Replace(vCharOut,"À","À") if vCharOut <> empty then vCharOut = Replace(vCharOut,"à","à") if vCharOut <> empty then vCharOut = Replace(vCharOut,"Ã","Ã") if vCharOut <> empty then vCharOut = Replace(vCharOut,"ã","ã") if vCharOut <> empty then vCharOut = Replace(vCharOut,"Ç","Ç") if vCharOut <> empty then vCharOut = Replace(vCharOut,"ç","ç") if vCharOut <> empty then vCharOut = Replace(vCharOut,"É","É") if vCharOut <> empty then vCharOut = Replace(vCharOut,"é","é") if vCharOut <> empty then vCharOut = Replace(vCharOut,"Ê","Ê") if vCharOut <> empty then vCharOut = Replace(vCharOut,"ê","ê") if vCharOut <> empty then vCharOut = Replace(vCharOut,"È","È") if vCharOut <> empty then vCharOut = Replace(vCharOut,"è","è") if vCharOut <> empty then vCharOut = Replace(vCharOut,"Í","Í") if vCharOut <> empty then vCharOut = Replace(vCharOut,"í","í") if vCharOut <> empty then vCharOut = Replace(vCharOut,"Î","Î") if vCharOut <> empty then vCharOut = Replace(vCharOut,"î","î") if vCharOut <> empty then vCharOut = Replace(vCharOut,"Ì","Ì") if vCharOut <> empty then vCharOut = Replace(vCharOut,"ì","ì") if vCharOut <> empty then vCharOut = Replace(vCharOut,"Ñ","Ñ") if vCharOut <> empty then vCharOut = Replace(vCharOut,"ñ","ñ") if vCharOut <> empty then vCharOut = Replace(vCharOut,"Ó","Ó") if vCharOut <> empty then vCharOut = Replace(vCharOut,"ó","ó") if vCharOut <> empty then vCharOut = Replace(vCharOut,"Ô","Ô") if vCharOut <> empty then vCharOut = Replace(vCharOut,"ô","ô") if vCharOut <> empty then vCharOut = Replace(vCharOut,"Ò","Ò") if vCharOut <> empty then vCharOut = Replace(vCharOut,"ò","ò") if vCharOut <> empty then vCharOut = Replace(vCharOut,"Õ","Õ") if vCharOut <> empty then vCharOut = Replace(vCharOut,"õ","õ") if vCharOut <> empty then vCharOut = Replace(vCharOut,"Ú","Ú") if vCharOut <> empty then vCharOut = Replace(vCharOut,"ú","ú") if vCharOut <> empty then vCharOut = Replace(vCharOut,"Û","Û") if vCharOut <> empty then vCharOut = Replace(vCharOut,"û","û") if vCharOut <> empty then vCharOut = Replace(vCharOut,"Ù","Ù") if vCharOut <> empty then vCharOut = Replace(vCharOut,"ù","ù") if vCharOut <> empty then vCharOut = Replace(vCharOut,"Ý","Ý") if vCharOut <> empty then vCharOut = Replace(vCharOut,"ý","ý") if vCharOut <> empty then vCharOut = Replace(vCharOut,"º","º") if vCharOut <> empty then vCharOut = Replace(vCharOut,"ª","ª") if vCharOut <> empty then vCharOut = Replace(vCharOut,"ü","ü") if vCharOut <> empty then vCharOut = Replace(vCharOut,"–","–") if vCharOut <> empty then vCharOut = Replace(vCharOut,"©","ˆ") if vCharOut <> empty then vCharOut = Replace(vCharOut,"[h1]","<h1>") if vCharOut <> empty then vCharOut = Replace(vCharOut,"[/h1]","</h1>") if vCharOut <> empty then vCharOut = Replace(vCharOut,"[h2]","<h2>") if vCharOut <> empty then vCharOut = Replace(vCharOut,"[/h2]","</h2>") if vCharOut <> empty then vCharOut = Replace(vCharOut,"[h3]","<h3>") if vCharOut <> empty then vCharOut = Replace(vCharOut,"[/h3]","</h3>") if vCharOut <> empty then vCharOut = Replace(vCharOut,"[h4]","<h4>") if vCharOut <> empty then vCharOut = Replace(vCharOut,"[/h4]","</h4>") if vCharOut <> empty then vCharOut = Replace(vCharOut,"[h5]","<h5>") if vCharOut <> empty then vCharOut = Replace(vCharOut,"[/h5]","</h5>") if vCharOut <> empty then vCharOut = Replace(vCharOut,"[b]","<b>") if vCharOut <> empty then vCharOut = Replace(vCharOut,"[/b]","</b>") if vCharOut <> empty then vCharOut = Replace(vCharOut,"[i]","<i>") if vCharOut <> empty then vCharOut = Replace(vCharOut,"[/i]","</i>") if vCharOut <> empty then vCharOut = Replace(vCharOut,"[u]","<u>") if vCharOut <> empty then vCharOut = Replace(vCharOut,"[/u]","</u>") if vCharOut <> empty then vCharOut = Replace(vCharOut,"[p]","<p>") if vCharOut <> empty then vCharOut = Replace(vCharOut,"[/p]","</p>") if vCharOut <> empty then vCharOut = Replace(vCharOut,"[ul]","<ul>") if vCharOut <> empty then vCharOut = Replace(vCharOut,"[/ul]","</ul>") if vCharOut <> empty then vCharOut = Replace(vCharOut,"[ol type=""A""]","<ol type=""A"">") if vCharOut <> empty then vCharOut = Replace(vCharOut,"[ol type=""a""]","<ol type=""a"">") if vCharOut <> empty then vCharOut = Replace(vCharOut,"[ol type=""I""]","<ol type=""I"">") if vCharOut <> empty then vCharOut = Replace(vCharOut,"[ol type=""1""]","<ol type=""1"">") if vCharOut <> empty then vCharOut = Replace(vCharOut,"[ol]","<ol>") if vCharOut <> empty then vCharOut = Replace(vCharOut,"[/ol]","</ol>") if vCharOut <> empty then vCharOut = Replace(vCharOut,"[li]","<li>") if vCharOut <> empty then vCharOut = Replace(vCharOut,"[/li]","</li>") if vCharOut <> empty then vCharOut = Replace(vCharOut,"[center]","<center>") if vCharOut <> empty then vCharOut = Replace(vCharOut,"[/center]","</center>") if vCharOut <> empty then vCharOut = Replace(vCharOut,"[a href","<a href") if vCharOut <> empty then vCharOut = Replace(vCharOut,"""]",""">") if vCharOut <> empty then vCharOut = Replace(vCharOut,"[/a]","</a>") if vCharOut <> empty then vCharOut = Replace(vCharOut,"[img","<img") if vCharOut <> empty then vCharOut = Replace(vCharOut,"src=""","src="""& vImagens) if vCharOut <> empty then vCharOut = Replace(vCharOut,"[br/]","<br/>") if vCharOut <> empty then vCharOut = Replace(vCharOut,"[br /]","<br/>") if vCharOut <> empty then vCharOut = Replace(vCharOut,"/]","/>") ' if vCharOut <> empty then vCharOut = Replace(vCharOut,vbcr,vbcrlf) ' if vCharOut <> empty then vCharOut = Replace(vCharOut,vblf,vbcrlf) if vCharOut <> empty then vCharOut = Replace(vCharOut,vbcrlf,"<br/>") fncCharOut = vCharOut End Function %> Response.Write Include Até hoje em ASP todas as minhas dúvidas somente o BUSCAR já resolvia http://forum.imasters.com.br/public/style_emoticons/default/thumbsup.gif , este é meu primeiro post. Bju, Deus abençoe!!! Lois Oliveira Gonzaga LogName Compartilhar este post Link para o post Compartilhar em outros sites
quintelab 91 Denunciar post Postado Agosto 3, 2008 Movido Plataforma .NET http://forum.imasters.com.br/public/style_emoticons/default/seta.gif Plataforma .NET » Web Applications LogName, Seja Bem Vindo ao Fórum Imasters, de uma olhada em nossas regras: Regras do Fórum iMasters Eu sempre aconselho as pessoas a ir tentando converter e quando existir dúvidas específicas postar aqui, pois dificilmente alguém irá converter seu código inteiro. Algumas coisas são padrões, e não mudaram como o replace e o respose.write! No caso do include crie uma sub para escrever seu código. Abraços... Compartilhar este post Link para o post Compartilhar em outros sites
LogName 0 Denunciar post Postado Agosto 4, 2008 Obrigada pela resposta, não entendi o caso do INCLUDE e SUB, como eu poderia por exemplo utilizar no VS2008 um cabeçalho unico para todos os arquivos? Como você indicou para usar sub, esta sub poderia ser chamada em todos os arquivos, exemplo, contatos.aspx sobre.aspx No caso este include veja que faz a funcao de corrigir acentuacao, para nao repetir nao entendi como colocar nas outras paginas. Compartilhar este post Link para o post Compartilhar em outros sites
quintelab 91 Denunciar post Postado Agosto 4, 2008 Você pode criar uma classe pública e colocar essa sua função, ae basta em todos os seus formulário você instanciar uma variável chamando essa função. Abraços... Compartilhar este post Link para o post Compartilhar em outros sites
LogName 0 Denunciar post Postado Agosto 4, 2008 Quando crio um App_Code\Inclusao.vb Imports Microsoft.VisualBasic Public Class Caracter Function fncCharOut(ByVal vCharOut As String) As String If vCharOut <> Nothing Then vCharOut = Replace(vCharOut, """""", """) fncCharOut = vCharOut End Function End Class Dentro do meu Default.aspx eu acesso direto a funcao ou tenho que fazer alguma outra coisa para puxar esta informacao? Não consegui puxar! Se eu ainda estiver indo contra qualquer regra me avise, ta? Obrigada, bju Lois Compartilhar este post Link para o post Compartilhar em outros sites
quintelab 91 Denunciar post Postado Agosto 4, 2008 É isso ae sua classe já esta criada, desta forma mesmo. Agora para acessa-la em seu formulário basta instanciar uma variável que receba sua classe. Da seguinte forma: Dim vCaracter As New Caracter Dim vRecebe As String vRecebe = vCaracter.fncCharOut("SEU_PARAMETRO") Abraços... Compartilhar este post Link para o post Compartilhar em outros sites
LogName 0 Denunciar post Postado Agosto 4, 2008 Eu já falei que te amo! kkk Já ajudou muito, acho que agora consegui concluir a migraçao daquele código! Só um pouquinho que te falo se consegui. Compartilhar este post Link para o post Compartilhar em outros sites
LogName 0 Denunciar post Postado Agosto 4, 2008 ESSE É O TEXTO QUE EU IA POSTANDO -------------------------------------------------- La ta assim no app_code\include.vb Imports Microsoft.VisualBasic Public Class Caracter Function fncCharOut(ByVal vCharOut As String) As String If vCharOut <> Nothing Then vCharOut = Replace(vCharOut, "á", "á") fncCharOut = vCharOut End Function End Class dae no default.aspx 'Importando Class Dim vCaracter As New Caracter Dim vTitle As String vTitle = "Háaaaa" .... Response.Write(" <title>" & vCaracter.fncCharOut("vTitle") & "</title>" & vbCrLf) Mas o resultado foi: <title>vTitle</title> Ou seja, nao fez nada, mas também nao deu erro! E agora? Como se não tivesse passado por dentro do vTitle ----------------------------------------------------------------------- Na ultima linha percebi meu erro: " " Coloquei vTitle dentro da aspa por isso nao funcionou. Agora resolvido. Compartilhar este post Link para o post Compartilhar em outros sites
LogName 0 Denunciar post Postado Agosto 4, 2008 Os principais ponto que vi na migracao deste código: Empty vira Nothing Include vira Class dentro de App_Code Dim tem que ser informado a função (aqui usei tudo As String) a não ser sobre a inclusão da classe que o querido (quintelab) me ajudou Ficou assim agora: Default.aspx <%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %> <% Response.AddHeader("Pragma", "no-cache") Response.Buffer = True Response.CacheControl = "no-cache" Response.Expires = -1500 Response.ExpiresAbsolute = Now() Session.LCID = 1046 Session.Timeout = 20 'Importando Class Dim vCaracter As New Caracter 'Configuracoes Dim vDomain, vHead As String vDomain = "localhost" 'meudominio.com.br vHead = nothing 'Links Dim vServer, vLink, vPagina, vTitle As String vTitle = "Migrando de Asp para Asp.NET" vServer = "http://" & Request.ServerVariables("SERVER_NAME") vLink = "http://" & Request.ServerVariables("SERVER_NAME") & Request.ServerVariables("URL") If Request.ServerVariables("QUERY_STRING") <> Nothing Then vLink = vLink & "?" & Request.ServerVariables("QUERY_STRING") vPagina = Replace(Request.ServerVariables("URL"), ".asp", Nothing) 'Links Funcoes Dim vFuncoes, vAsp, vCss, vJs, vSwf As String vFuncoes = vServer & "funcoes/" vAsp = vFuncoes & "asp/" vCss = vFuncoes & "css/" vJs = vFuncoes & "js/" vSwf = vFuncoes & "swf/" 'Links Imagens Dim vImagens, vGif, vJpg, vIco, vPng As String vImagens = vServer & "imagens/" vGif = vImagens & "gif/" vJpg = vImagens & "jpg/" vIco = vImagens & "ico/" vPng = vImagens & "png/" 'Informacoes da Pagina Dim vCopyright, vDescription, vKeywords As String vCopyright = "Aqui vai as descrições de Copyright para facilitar no RSS e SEO" vDescription = "Aqui vai as descrições de Copyright para facilitar no RSS e SEO" vKeywords = "Aqui vai as descrições de Copyright para facilitar no RSS e SEO" 'Descarrega a medida que constroi Response.Flush() 'Cabecalho pagina Response.Write("<?xml version=""1.0"" encoding=""iso-8859-1""?>" & vbCrLf) Response.Write("<!DOCTYPE html PUBLIC ""-//W3C//DTD XHTML 1.0 Transitional//EN"" ""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"">" & vbCrLf) Response.Write("<html xmlns=""http://www.w3.org/1999/xhtml"" xml:lang=""pt"" lang=""pt"">" & vbCrLf) Response.Write(" <head>" & vbCrLf) Response.Write(" <title>" & vCaracter.fncCharOut(vTitle) & "</title>" & vbCrLf) Response.Write(" <meta http-equiv=""charset"" content=""ISO-8859-1""/>" & vbCrLf) Response.Write(" <meta http-equiv=""conteudo-language"" content=""Portuguese""/>" & vbCrLf) Response.Write(" <meta http-equiv=""conteudo-type"" content=""application/xhtml+xml; charset=iso-8859-1""/>" & vbCrLf) Response.Write(" <meta http-equiv=""expires"" content=""never""/>" & vbCrLf) Response.Write(" <meta http-equiv=""imagetoolbar"" content=""no""/>" & vbCrLf) Response.Write(" <meta http-equiv=""pragma"" content=""no-cache""/>" & vbCrLf) Response.Write(" <meta http-equiv=""revisit-after"" content=""3 days""/>" & vbCrLf) Response.Write(" <meta name=""author"" content=""Lois Oliveira Gonzaga""/>" & vbCrLf) Response.Write(" <meta name=""copyright"" content=""" & vCaracter.fncCharOut(vCopyright) & """/>" & vbCrLf) Response.Write(" <meta name=""dc.language"" content=""pt-br""/>" & vbCrLf) Response.Write(" <meta name=""description"" content=""" & vCaracter.fncCharOut(vDescription) & """/>" & vbCrLf) Response.Write(" <meta name=""distribution"" content=""global""/>" & vbCrLf) Response.Write(" <meta name=""expires"" content=""never""/>" & vbCrLf) Response.Write(" <meta name=""generator"" content=""" & vCaracter.fncCharOut(vTitle) & " - v.9""/>" & vbCrLf) Response.Write(" <meta name=""googlebot"" content=""all""/>" & vbCrLf) Response.Write(" <meta name=""language"" content=""pt-br""/>" & vbCrLf) Response.Write(" <meta name=""keywords"" content=""" & vCaracter.fncCharOut(vKeywords) & """/>" & vbCrLf) Response.Write(" <meta name=""MSSmartTagsPreventParsing"" content=""true""/>" & vbCrLf) Response.Write(" <meta name=""rating"" content=""general""/>" & vbCrLf) Response.Write(" <meta name=""revisit-after"" content=""3 days""/>" & vbCrLf) Response.Write(" <meta name=""robots"" content=""all""/>" & vbCrLf) Response.Write(" <meta name=""title"" content=""" & vCaracter.fncCharOut(vTitle) & """/>" & vbCrLf) Response.Write(" <meta name=""url"" content=""" & vDomain & """/>" & vbCrLf) Response.Write(" <link rel=""shortcut icon"" href=""" & vIco & "favicon.ico""/>" & vbCrLf) Response.Write(" <link rel=""stylesheet"" href=""" & vCss & "tela.css"" type=""text/css""/>" & vbCrLf) Response.Write(vHead) Response.Write(" </head>" & vbCrLf) Response.Write(" <body>" & vbCrLf) Response.Write(" <div id=""estrutura"">" & vbCrLf) Response.Write(" <div id=""superior"">Aqui viria cabecalho</div>" & vbCrLf) Response.Write(" <div id=""conteudo"">Aqui vem o conteudo somente desta pagina dentro do vCaracter.fncCharOut</div>" & vbCrLf) Response.Write(" <div id=""rodape"">" & vbCrLf) Response.Write(" <a href=""http://validator.w3.org/check?uri=referer"" target=""_blank"" title=""Validação desta página conforme o padrão W3C/XHTML"">Validação XHTML</a> | " & vbCrLf) Response.Write(" <a href=""http://jigsaw.w3.org/css-validator/check/referer"" target=""_blank"" title=""Validação desta página conforme o padrão W3C/CSS"">Validação CSS</a>" & vbCrLf) Response.Write(" </div>" & vbCrLf) Response.Write(" </div>" & vbCrLf) Response.Write(" <noscript>O Browser não suporta o script escrito, atualize para Microsoft Internet Explorer 7, Mozilla Firefox 1.3, Opera 8.1, Safari 2.5 ou Flock 1.0, todos nestas versões ou superiores</noscript>" & vbCrLf) Response.Write(" </body>" & vbCrLf) Response.Write("</html>" & vbCrLf) %> App_Code\Caracter.vb Imports Microsoft.VisualBasic Public Class Caracter Function fncCharOut(ByVal vCharOut As String) As String If vCharOut <> Nothing Then vCharOut = Replace(vCharOut, """""", """) ' if vCharOut <> Nothing then vCharOut = Replace(vCharOut,"<","<") ' if vCharOut <> Nothing then vCharOut = Replace(vCharOut,">",">") If vCharOut <> Nothing Then vCharOut = Replace(vCharOut, "·", "·") If vCharOut <> Nothing Then vCharOut = Replace(vCharOut, "&", "&") If vCharOut <> Nothing Then vCharOut = Replace(vCharOut, "´", "´") If vCharOut <> Nothing Then vCharOut = Replace(vCharOut, "Á", "Á") If vCharOut <> Nothing Then vCharOut = Replace(vCharOut, "á", "á") If vCharOut <> Nothing Then vCharOut = Replace(vCharOut, "Â", "Â") If vCharOut <> Nothing Then vCharOut = Replace(vCharOut, "â", "â") If vCharOut <> Nothing Then vCharOut = Replace(vCharOut, "À", "À") If vCharOut <> Nothing Then vCharOut = Replace(vCharOut, "à", "à") If vCharOut <> Nothing Then vCharOut = Replace(vCharOut, "Ã", "Ã") If vCharOut <> Nothing Then vCharOut = Replace(vCharOut, "ã", "ã") If vCharOut <> Nothing Then vCharOut = Replace(vCharOut, "Ç", "Ç") If vCharOut <> Nothing Then vCharOut = Replace(vCharOut, "ç", "ç") If vCharOut <> Nothing Then vCharOut = Replace(vCharOut, "É", "É") If vCharOut <> Nothing Then vCharOut = Replace(vCharOut, "é", "é") If vCharOut <> Nothing Then vCharOut = Replace(vCharOut, "Ê", "Ê") If vCharOut <> Nothing Then vCharOut = Replace(vCharOut, "ê", "ê") If vCharOut <> Nothing Then vCharOut = Replace(vCharOut, "È", "È") If vCharOut <> Nothing Then vCharOut = Replace(vCharOut, "è", "è") If vCharOut <> Nothing Then vCharOut = Replace(vCharOut, "Í", "Í") If vCharOut <> Nothing Then vCharOut = Replace(vCharOut, "í", "í") If vCharOut <> Nothing Then vCharOut = Replace(vCharOut, "Î", "Î") If vCharOut <> Nothing Then vCharOut = Replace(vCharOut, "î", "î") If vCharOut <> Nothing Then vCharOut = Replace(vCharOut, "Ì", "Ì") If vCharOut <> Nothing Then vCharOut = Replace(vCharOut, "ì", "ì") If vCharOut <> Nothing Then vCharOut = Replace(vCharOut, "Ñ", "Ñ") If vCharOut <> Nothing Then vCharOut = Replace(vCharOut, "ñ", "ñ") If vCharOut <> Nothing Then vCharOut = Replace(vCharOut, "Ó", "Ó") If vCharOut <> Nothing Then vCharOut = Replace(vCharOut, "ó", "ó") If vCharOut <> Nothing Then vCharOut = Replace(vCharOut, "Ô", "Ô") If vCharOut <> Nothing Then vCharOut = Replace(vCharOut, "ô", "ô") If vCharOut <> Nothing Then vCharOut = Replace(vCharOut, "Ò", "Ò") If vCharOut <> Nothing Then vCharOut = Replace(vCharOut, "ò", "ò") If vCharOut <> Nothing Then vCharOut = Replace(vCharOut, "Õ", "Õ") If vCharOut <> Nothing Then vCharOut = Replace(vCharOut, "õ", "õ") If vCharOut <> Nothing Then vCharOut = Replace(vCharOut, "Ú", "Ú") If vCharOut <> Nothing Then vCharOut = Replace(vCharOut, "ú", "ú") If vCharOut <> Nothing Then vCharOut = Replace(vCharOut, "Û", "Û") If vCharOut <> Nothing Then vCharOut = Replace(vCharOut, "û", "û") If vCharOut <> Nothing Then vCharOut = Replace(vCharOut, "Ù", "Ù") If vCharOut <> Nothing Then vCharOut = Replace(vCharOut, "ù", "ù") If vCharOut <> Nothing Then vCharOut = Replace(vCharOut, "Ý", "Ý") If vCharOut <> Nothing Then vCharOut = Replace(vCharOut, "ý", "ý") If vCharOut <> Nothing Then vCharOut = Replace(vCharOut, "º", "º") If vCharOut <> Nothing Then vCharOut = Replace(vCharOut, "ª", "ª") If vCharOut <> Nothing Then vCharOut = Replace(vCharOut, "ü", "ü") If vCharOut <> Nothing Then vCharOut = Replace(vCharOut, "–", "–") If vCharOut <> Nothing Then vCharOut = Replace(vCharOut, "©", "ˆ") If vCharOut <> Nothing Then vCharOut = Replace(vCharOut, "[h1]", "<h1>") If vCharOut <> Nothing Then vCharOut = Replace(vCharOut, "[/h1]", "</h1>") If vCharOut <> Nothing Then vCharOut = Replace(vCharOut, "[h2]", "<h2>") If vCharOut <> Nothing Then vCharOut = Replace(vCharOut, "[/h2]", "</h2>") If vCharOut <> Nothing Then vCharOut = Replace(vCharOut, "[h3]", "<h3>") If vCharOut <> Nothing Then vCharOut = Replace(vCharOut, "[/h3]", "</h3>") If vCharOut <> Nothing Then vCharOut = Replace(vCharOut, "[h4]", "<h4>") If vCharOut <> Nothing Then vCharOut = Replace(vCharOut, "[/h4]", "</h4>") If vCharOut <> Nothing Then vCharOut = Replace(vCharOut, "[h5]", "<h5>") If vCharOut <> Nothing Then vCharOut = Replace(vCharOut, "[/h5]", "</h5>") If vCharOut <> Nothing Then vCharOut = Replace(vCharOut, "[b]", "<b>") If vCharOut <> Nothing Then vCharOut = Replace(vCharOut, "[/b]", "</b>") If vCharOut <> Nothing Then vCharOut = Replace(vCharOut, "[i]", "<i>") If vCharOut <> Nothing Then vCharOut = Replace(vCharOut, "[/i]", "</i>") If vCharOut <> Nothing Then vCharOut = Replace(vCharOut, "[u]", "<u>") If vCharOut <> Nothing Then vCharOut = Replace(vCharOut, "[/u]", "</u>") If vCharOut <> Nothing Then vCharOut = Replace(vCharOut, "[p]", "<p>") If vCharOut <> Nothing Then vCharOut = Replace(vCharOut, "[/p]", "</p>") If vCharOut <> Nothing Then vCharOut = Replace(vCharOut, "[ul]", "<ul>") If vCharOut <> Nothing Then vCharOut = Replace(vCharOut, "[/ul]", "</ul>") If vCharOut <> Nothing Then vCharOut = Replace(vCharOut, "[ol type=""A""]", "<ol type=""A"">") If vCharOut <> Nothing Then vCharOut = Replace(vCharOut, "[ol type=""a""]", "<ol type=""a"">") If vCharOut <> Nothing Then vCharOut = Replace(vCharOut, "[ol type=""I""]", "<ol type=""I"">") If vCharOut <> Nothing Then vCharOut = Replace(vCharOut, "[ol type=""1""]", "<ol type=""1"">") If vCharOut <> Nothing Then vCharOut = Replace(vCharOut, "[ol]", "<ol>") If vCharOut <> Nothing Then vCharOut = Replace(vCharOut, "[/ol]", "</ol>") If vCharOut <> Nothing Then vCharOut = Replace(vCharOut, "[li]", "<li>") If vCharOut <> Nothing Then vCharOut = Replace(vCharOut, "[/li]", "</li>") If vCharOut <> Nothing Then vCharOut = Replace(vCharOut, "[center]", "<center>") If vCharOut <> Nothing Then vCharOut = Replace(vCharOut, "[/center]", "</center>") If vCharOut <> Nothing Then vCharOut = Replace(vCharOut, "[a href", "<a href") If vCharOut <> Nothing Then vCharOut = Replace(vCharOut, """]", """>") If vCharOut <> Nothing Then vCharOut = Replace(vCharOut, "[/a]", "</a>") If vCharOut <> Nothing Then vCharOut = Replace(vCharOut, "[img", "<img") 'If vCharOut <> Nothing Then vCharOut = Replace(vCharOut, "src=""", "src=""" & vImagens) If vCharOut <> Nothing Then vCharOut = Replace(vCharOut, "[br/]", "<br/>") If vCharOut <> Nothing Then vCharOut = Replace(vCharOut, "[br /]", "<br/>") If vCharOut <> Nothing Then vCharOut = Replace(vCharOut, "/]", "/>") ' if vCharOut <> Nothing then vCharOut = Replace(vCharOut,vbcr,vbcrlf) ' if vCharOut <> Nothing then vCharOut = Replace(vCharOut,vblf,vbcrlf) If vCharOut <> Nothing Then vCharOut = Replace(vCharOut, vbCrLf, "<br/>") fncCharOut = vCharOut End Function End Class Acho que é isso, agora quero aprender a conectar base de dados, access, mysql, mssql... Bola pra frente ALGUEM DEFINE COMO RESOLVIDO Bju, Deus abençoe!!! Lois Oliveira Gonzaga LogName Compartilhar este post Link para o post Compartilhar em outros sites
quintelab 91 Denunciar post Postado Agosto 4, 2008 Bom que deu certo!! http://forum.imasters.com.br/public/style_emoticons/default/clap.gif Ja editei para RESOLVIDO!! Abraços... Compartilhar este post Link para o post Compartilhar em outros sites