<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Pablo Viale &#187; ASP.NET 2.0 / 3.5</title>
	<atom:link href="http://www.viale.mx/index.php/category/aspnet/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.viale.mx</link>
	<description>Consejos para diseño y desarrollo de aplicaciones web</description>
	<lastBuildDate>Wed, 29 Jun 2011 22:18:01 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>BC30002: Type &#8216;System.Data.Linq.Mapping.DatabaseAttribute&#8217; is not defined.</title>
		<link>http://www.viale.mx/2011/06/29/bc30002-type-system-data-linq-mapping-databaseattribute-is-not-defined/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=bc30002-type-system-data-linq-mapping-databaseattribute-is-not-defined</link>
		<comments>http://www.viale.mx/2011/06/29/bc30002-type-system-data-linq-mapping-databaseattribute-is-not-defined/#comments</comments>
		<pubDate>Wed, 29 Jun 2011 22:18:01 +0000</pubDate>
		<dc:creator>Pablo Viale</dc:creator>
				<category><![CDATA[ASP.NET 2.0 / 3.5]]></category>
		<category><![CDATA[IIS]]></category>
		<category><![CDATA[SQL (mySQL)]]></category>

		<guid isPermaLink="false">http://www.viale.mx/?p=549</guid>
		<description><![CDATA[Si estás utilizando LINQ en tu aplicación de asp.net y te sale este error: BC30002: Type 'System.Data.Linq.Mapping.DatabaseAttribute' is not defined. Es probable que no hayas hecho referencia del assembly en el archivo web.config. Entre el tag assemblies y /assemblies de tu archivo web.config coloca lo siguiente: Clic para mostrar texto plano XML: &#60;add assembly="System.Data.Linq, Version=3.5.0.0, [...]]]></description>
			<content:encoded><![CDATA[<p>Si estás utilizando LINQ en tu aplicación de asp.net y te sale este error:</p>
<p><code>BC30002: Type 'System.Data.Linq.Mapping.DatabaseAttribute' is not defined.</code></p>
<p>Es probable que no hayas hecho referencia del assembly en el archivo web.config.<br />
Entre el tag assemblies y /assemblies de tu archivo web.config coloca lo siguiente:</p>
<div class="igBar"><span id="lxml-2"><a href="#" onclick="javascript:showPlainTxt('xml-2'); return false;">Clic para mostrar texto plano</a></span></div>
<div class="syntax_hilite"><span class="langName">XML:</span>
<div id="xml-2">
<div class="xml">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;add</span> <span style="color: #000066;">assembly</span>=<span style="color: #ff0000;">"System.Data.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"</span><span style="font-weight: bold; color: black;">/&gt;</span></span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>¡Suerte!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.viale.mx/2011/06/29/bc30002-type-system-data-linq-mapping-databaseattribute-is-not-defined/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>C&#243;mo obtener el UserId del usuario logueado</title>
		<link>http://www.viale.mx/2010/11/26/como-obtener-el-guid-del-usuario-logueado/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=como-obtener-el-guid-del-usuario-logueado</link>
		<comments>http://www.viale.mx/2010/11/26/como-obtener-el-guid-del-usuario-logueado/#comments</comments>
		<pubDate>Fri, 26 Nov 2010 20:46:48 +0000</pubDate>
		<dc:creator>Pablo Viale</dc:creator>
				<category><![CDATA[ASP.NET 2.0 / 3.5]]></category>

		<guid isPermaLink="false">http://www.viale.mx/?p=532</guid>
		<description><![CDATA[Para obtener el UserID del usuario actualmente logueado, utiliza el siguiente código: Clic para mostrar texto plano VB.NET: Dim UsuarioLogueado As MembershipUser = Membership.GetUser&#40;&#41; Dim ElGUID As Guid = UsuarioLogueado.ProviderUserKey 'Si lo necesitas como string utiliza ElGUID.ToString En el ejemplo el UserId queda almacenado en la variable ElGUID que es de tipo Guid (Globally unique [...]]]></description>
			<content:encoded><![CDATA[<p>Para obtener el UserID del usuario actualmente logueado, utiliza el siguiente código:</p>
<div class="igBar"><span id="lvbnet-4"><a href="#" onclick="javascript:showPlainTxt('vbnet-4'); return false;">Clic para mostrar texto plano</a></span></div>
<div class="syntax_hilite"><span class="langName">VB.NET:</span>
<div id="vbnet-4">
<div class="vbnet">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0600FF;">Dim</span> UsuarioLogueado <span style="color: #FF8000;">As</span> MembershipUser = Membership.<span style="color: #0000FF;">GetUser</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0600FF;">Dim</span> ElGUID <span style="color: #FF8000;">As</span> Guid = UsuarioLogueado.<span style="color: #0000FF;">ProviderUserKey</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #008080; font-style: italic;">'Si lo necesitas como string utiliza ElGUID.ToString </span></div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>En el ejemplo el <em>UserId</em> queda almacenado en la variable <em>ElGUID</em> que es de tipo <em>Guid (Globally unique identifier)</em>. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.viale.mx/2010/11/26/como-obtener-el-guid-del-usuario-logueado/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Utilizando m&#250;ltiples controles UpdateProgress en una sola p&#225;gina</title>
		<link>http://www.viale.mx/2010/11/12/utilizando-multiples-controles-updateprogress-en-una-sola-pagina/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=utilizando-multiples-controles-updateprogress-en-una-sola-pagina</link>
		<comments>http://www.viale.mx/2010/11/12/utilizando-multiples-controles-updateprogress-en-una-sola-pagina/#comments</comments>
		<pubDate>Fri, 12 Nov 2010 17:32:54 +0000</pubDate>
		<dc:creator>Pablo Viale</dc:creator>
				<category><![CDATA[ASP.NET 2.0 / 3.5]]></category>
		<category><![CDATA[Ajax]]></category>

		<guid isPermaLink="false">http://www.viale.mx/?p=510</guid>
		<description><![CDATA[Si tienes dos o más controles UpdatePanel que quieres que se actualicen por separado, quizás también quieras tener diferentes indicadores “un momento por favor…” para cada uno de ellos, con la finalidad de que se muestren en diferentes posiciones. Antes de darte la solución considera este código: Clic para mostrar texto plano ASP: &#60;asp:ScriptManager ID="ScriptManager1" [...]]]></description>
			<content:encoded><![CDATA[<p><html xmlns="">Si tienes dos o más controles <strong>UpdatePanel</strong> que quieres que se actualicen por separado, quizás también quieras tener diferentes indicadores “un momento por favor…” para cada uno de ellos, con la finalidad de que se muestren en diferentes posiciones.</p>
<p>Antes de darte la solución considera este código:</p>
<div class="igBar"><span id="lasp-8"><a href="#" onclick="javascript:showPlainTxt('asp-8'); return false;">Clic para mostrar texto plano</a></span></div>
<div class="syntax_hilite"><span class="langName">ASP:</span>
<div id="asp-8">
<div class="asp">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;asp:ScriptManager ID=<span style="color:#CC0000;">"ScriptManager1"</span> runat=<span style="color:#CC0000;">"server"</span> /&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &lt;asp:UpdatePanel ID=<span style="color:#CC0000;">"UpdatePanel1"</span> runat=<span style="color:#CC0000;">"server"</span>&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &lt;Triggers&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;asp:AsyncPostBackTrigger ControlID=<span style="color:#CC0000;">"Boton1"</span> EventName=<span style="color:#CC0000;">"Click"</span> /&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &lt;/Triggers&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &lt;ContentTemplate&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;asp:UpdateProgress ID=<span style="color:#CC0000;">"UpdateProgress1"</span> runat=<span style="color:#CC0000;">"server"</span> DisplayAfter=<span style="color:#CC0000;">"0"</span>&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;ProgressTemplate&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Un momento por favor...</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/ProgressTemplate&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/asp:UpdateProgress&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;asp:Button ID=<span style="color:#CC0000;">"Boton1"</span> runat=<span style="color:#CC0000;">"server"</span> Text=<span style="color:#CC0000;">"Botón 1"</span> /&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;asp:Label ID=<span style="color:#CC0000;">"Hora1"</span> runat=<span style="color:#CC0000;">"server"</span> Text=<span style="color:#CC0000;">"&lt;br /&gt;"</span>&gt;&lt;/asp:Label&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &lt;/ContentTemplate&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &lt;/asp:UpdatePanel&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &lt;br /&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &lt;br /&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &lt;asp:UpdatePanel ID=<span style="color:#CC0000;">"UpdatePanel2"</span> runat=<span style="color:#CC0000;">"server"</span>&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &lt;Triggers&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;asp:AsyncPostBackTrigger ControlID=<span style="color:#CC0000;">"Boton2"</span> EventName=<span style="color:#CC0000;">"Click"</span> /&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &lt;/Triggers&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &lt;ContentTemplate&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;asp:UpdateProgress ID=<span style="color:#CC0000;">"UpdateProgress2"</span> runat=<span style="color:#CC0000;">"server"</span> DisplayAfter=<span style="color:#CC0000;">"0"</span>&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;ProgressTemplate&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Un momento por favor...</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/ProgressTemplate&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/asp:UpdateProgress&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;asp:Button ID=<span style="color:#CC0000;">"Boton2"</span> runat=<span style="color:#CC0000;">"server"</span> Text=<span style="color:#CC0000;">"Botón 2"</span> /&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;asp:Label ID=<span style="color:#CC0000;">"Hora2"</span> runat=<span style="color:#CC0000;">"server"</span> Text=<span style="color:#CC0000;">""</span>&gt;&lt;/asp:Label&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &lt;/ContentTemplate&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &lt;/asp:UpdatePanel&gt; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<div class="igBar"><span id="lvbnet-9"><a href="#" onclick="javascript:showPlainTxt('vbnet-9'); return false;">Clic para mostrar texto plano</a></span></div>
<div class="syntax_hilite"><span class="langName">VB.NET:</span>
<div id="vbnet-9">
<div class="vbnet">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Protected <span style="color: #0600FF;">Sub</span> Boton1_Click<span style="color: #000000;">&#40;</span><span style="color: #FF8000;">ByVal</span> sender <span style="color: #FF8000;">As</span> <span style="color: #FF0000;">Object</span>, <span style="color: #FF8000;">ByVal</span> e <span style="color: #FF8000;">As</span> System.<span style="color: #0000FF;">EventArgs</span><span style="color: #000000;">&#41;</span> <span style="color: #FF8000;">Handles</span> Boton1.<span style="color: #0000FF;">Click</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; Threading.<span style="color: #0000FF;">Thread</span>.<span style="color: #0000FF;">Sleep</span><span style="color: #000000;">&#40;</span><span style="color: #FF0000;color:#800000;">1000</span><span style="color: #000000;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; Hora1.<span style="color: #0000FF;">Text</span> = <span style="color: #808080;">"La hora es "</span> &amp; <span style="color: #0600FF;">Now</span>.<span style="color: #0000FF;">ToString</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0600FF;">End</span> <span style="color: #0600FF;">Sub</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; Protected <span style="color: #0600FF;">Sub</span> Boton2_Click<span style="color: #000000;">&#40;</span><span style="color: #FF8000;">ByVal</span> sender <span style="color: #FF8000;">As</span> <span style="color: #FF0000;">Object</span>, <span style="color: #FF8000;">ByVal</span> e <span style="color: #FF8000;">As</span> System.<span style="color: #0000FF;">EventArgs</span><span style="color: #000000;">&#41;</span> <span style="color: #FF8000;">Handles</span> Boton2.<span style="color: #0000FF;">Click</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; Threading.<span style="color: #0000FF;">Thread</span>.<span style="color: #0000FF;">Sleep</span><span style="color: #000000;">&#40;</span><span style="color: #FF0000;color:#800000;">1000</span><span style="color: #000000;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; Hora2.<span style="color: #0000FF;">Text</span> = <span style="color: #808080;">"La hora es "</span> &amp; <span style="color: #0600FF;">Now</span>.<span style="color: #0000FF;">ToString</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0600FF;">End</span> <span style="color: #0600FF;">Sub</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>El cual genera lo siguiente:</p>
<p><a href="http://www.viale.mx/wp-content/uploads/2010/11/image.png"><img title="image" style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" src="http://www.viale.mx/wp-content/uploads/2010/11/image_thumb.png" border="0" alt="image" width="244" height="111" /></a></p>
<p>Y al hacer clic en el botón 1 (o en el 2) ocurre lo siguiente:</p>
<p><a href="http://www.viale.mx/wp-content/uploads/2010/11/image1.png"><img title="image" style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" src="http://www.viale.mx/wp-content/uploads/2010/11/image_thumb1.png" border="0" alt="image" width="170" height="121" /></a></p>
<p>Los dos controles <strong>UpdateProgress</strong> aparecieron porque es su comportamiento natural cuando se hace un postBack. Obviamente queremos que cada uno aparezca únicamente cuando se haga clic en su botón correspondiente.</p>
<p>Para hacerlo, utiliza la propiedad <strong>AssociatedUpdatePanelID </strong>del control <strong>UpdateProgress,</strong> de tal forma que tu código quede así:</p>
<div class="igBar"><span id="lasp-10"><a href="#" onclick="javascript:showPlainTxt('asp-10'); return false;">Clic para mostrar texto plano</a></span></div>
<div class="syntax_hilite"><span class="langName">ASP:</span>
<div id="asp-10">
<div class="asp">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;asp:ScriptManager ID=<span style="color:#CC0000;">"ScriptManager1"</span> runat=<span style="color:#CC0000;">"server"</span> /&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &lt;asp:UpdatePanel ID=<span style="color:#CC0000;">"UpdatePanel1"</span> runat=<span style="color:#CC0000;">"server"</span>&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &lt;Triggers&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;asp:AsyncPostBackTrigger ControlID=<span style="color:#CC0000;">"Boton1"</span> EventName=<span style="color:#CC0000;">"Click"</span> /&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &lt;/Triggers&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &lt;ContentTemplate&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;asp:UpdateProgress ID=<span style="color:#CC0000;">"UpdateProgress1"</span> runat=<span style="color:#CC0000;">"server"</span> DisplayAfter=<span style="color:#CC0000;">"0"</span> AssociatedUpdatePanelID=<span style="color:#CC0000;">"UpdatePanel1"</span>&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;ProgressTemplate&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Un momento por favor...</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/ProgressTemplate&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/asp:UpdateProgress&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;asp:Button ID=<span style="color:#CC0000;">"Boton1"</span> runat=<span style="color:#CC0000;">"server"</span> Text=<span style="color:#CC0000;">"Botón 1"</span> /&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;asp:Label ID=<span style="color:#CC0000;">"Hora1"</span> runat=<span style="color:#CC0000;">"server"</span> Text=<span style="color:#CC0000;">"&lt;br /&gt;"</span>&gt;&lt;/asp:Label&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &lt;/ContentTemplate&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &lt;/asp:UpdatePanel&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &lt;br /&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &lt;br /&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &lt;asp:UpdatePanel ID=<span style="color:#CC0000;">"UpdatePanel2"</span> runat=<span style="color:#CC0000;">"server"</span>&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &lt;Triggers&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;asp:AsyncPostBackTrigger ControlID=<span style="color:#CC0000;">"Boton2"</span> EventName=<span style="color:#CC0000;">"Click"</span> /&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &lt;/Triggers&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &lt;ContentTemplate&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;asp:UpdateProgress ID=<span style="color:#CC0000;">"UpdateProgress2"</span> runat=<span style="color:#CC0000;">"server"</span> DisplayAfter=<span style="color:#CC0000;">"0"</span> AssociatedUpdatePanelID=<span style="color:#CC0000;">"UpdatePanel2"</span>&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;ProgressTemplate&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Un momento por favor...</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/ProgressTemplate&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/asp:UpdateProgress&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;asp:Button ID=<span style="color:#CC0000;">"Boton2"</span> runat=<span style="color:#CC0000;">"server"</span> Text=<span style="color:#CC0000;">"Botón 2"</span> /&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;asp:Label ID=<span style="color:#CC0000;">"Hora2"</span> runat=<span style="color:#CC0000;">"server"</span> Text=<span style="color:#CC0000;">""</span>&gt;&lt;/asp:Label&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &lt;/ContentTemplate&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &lt;/asp:UpdatePanel&gt; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p><em>El código VB quedaría igual</em></p>
<p>De esta forma al oprimir el primer botón ocurrirá esto:</p>
<p><a href="http://www.viale.mx/wp-content/uploads/2010/11/image2.png"><img title="image" style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" src="http://www.viale.mx/wp-content/uploads/2010/11/image_thumb2.png" border="0" alt="image" width="181" height="112" /></a></p>
<p>Y al oprimir el segundo botón verás esto:</p>
<p><a href="http://www.viale.mx/wp-content/uploads/2010/11/image3.png"><img title="image" style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" src="http://www.viale.mx/wp-content/uploads/2010/11/image_thumb3.png" border="0" alt="image" width="289" height="110" /></a></p>
<p>De esta forma puedes colocar varios indicadores para cada una de las partes en las que dividas visualmente tu página.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.viale.mx/2010/11/12/utilizando-multiples-controles-updateprogress-en-una-sola-pagina/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cómo asignar un mismo procedimiento a múltiples botones</title>
		<link>http://www.viale.mx/2010/07/05/como-asignar-un-mismo-procedimiento-a-multiples-botones/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=como-asignar-un-mismo-procedimiento-a-multiples-botones</link>
		<comments>http://www.viale.mx/2010/07/05/como-asignar-un-mismo-procedimiento-a-multiples-botones/#comments</comments>
		<pubDate>Mon, 05 Jul 2010 17:09:31 +0000</pubDate>
		<dc:creator>Pablo Viale</dc:creator>
				<category><![CDATA[ASP.NET 2.0 / 3.5]]></category>

		<guid isPermaLink="false">http://www.viale.mx/?p=463</guid>
		<description><![CDATA[Supongamos que por alguna razón quieres colocar dos botones en una página ASP.NET que ejecuten el mismo procedimiento. Por ejemplo, un largo formulario con dos botones para guardar los cambios. Solamente tienes que escribir el código para uno de los botones, como normalmente lo harías. Y para el segundo, establece el evento "OnClick" al procedimiento [...]]]></description>
			<content:encoded><![CDATA[<p>Supongamos que por alguna razón quieres colocar dos botones en una página ASP.NET que ejecuten el mismo procedimiento. Por ejemplo, un largo formulario con dos botones para guardar los cambios.</p>
<p>Solamente tienes que escribir el código para uno de los botones, como normalmente lo harías.</p>
<p>Y para el segundo, establece el evento "OnClick" al procedimiento del primer botón.</p>
<p>Aquí está un ejemplo con los dos botones:</p>
<div class="igBar"><span id="lasp-12"><a href="#" onclick="javascript:showPlainTxt('asp-12'); return false;">Clic para mostrar texto plano</a></span></div>
<div class="syntax_hilite"><span class="langName">ASP:</span>
<div id="asp-12">
<div class="asp">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;asp:Button ID=<span style="color:#CC0000;">"Guardar"</span> runat=<span style="color:#CC0000;">"server"</span> Text=<span style="color:#CC0000;">"Guardar cambios"</span> /&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;asp:Button ID=<span style="color:#CC0000;">"Guardar2"</span> runat=<span style="color:#CC0000;">"server"</span> Text=<span style="color:#CC0000;">"Guardar cambios"</span> OnClick=<span style="color:#CC0000;">"Guardar_Click"</span> /&gt; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>¡Suerte!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.viale.mx/2010/07/05/como-asignar-un-mismo-procedimiento-a-multiples-botones/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Internet Explorer deja un espacio entre im&#225;genes</title>
		<link>http://www.viale.mx/2010/07/05/internet-explorer-deja-un-espacio-entre-imagenes/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=internet-explorer-deja-un-espacio-entre-imagenes</link>
		<comments>http://www.viale.mx/2010/07/05/internet-explorer-deja-un-espacio-entre-imagenes/#comments</comments>
		<pubDate>Mon, 05 Jul 2010 16:34:48 +0000</pubDate>
		<dc:creator>Pablo Viale</dc:creator>
				<category><![CDATA[ASP.NET 2.0 / 3.5]]></category>

		<guid isPermaLink="false">http://www.viale.mx/?p=453</guid>
		<description><![CDATA[A veces ASP.NET deja pequeños espacios de uno o dos pixeles entre una imagen y otra, como si se tratara de un “padding-bottom”.  He encontrado que estos espacios en ocasiones se deben a saltos de línea (aunque suene ridículo) que se dejan en el código fuente. Ejemplo: Clic para mostrar texto plano ASP: &#60;tr&#62; &#160; [...]]]></description>
			<content:encoded><![CDATA[<p>A veces ASP.NET deja pequeños espacios de uno o dos pixeles entre una imagen y otra, como si se tratara de un “padding-bottom”.  He encontrado que estos espacios en ocasiones se deben a saltos de línea (aunque suene ridículo) que se dejan en el código fuente.</p>
<p>Ejemplo:</p>
<div class="igBar"><span id="lasp-16"><a href="#" onclick="javascript:showPlainTxt('asp-16'); return false;">Clic para mostrar texto plano</a></span></div>
<div class="syntax_hilite"><span class="langName">ASP:</span>
<div id="asp-16">
<div class="asp">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;tr&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp;&lt;td&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &lt;asp:Image Id=<span style="color:#CC0000;">"Imagen1"</span> runat=<span style="color:#CC0000;">"server"</span>&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp;&lt;/td&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;/tr&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;tr&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp;&lt;td&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &lt;asp:Image Id=<span style="color:#CC0000;">"Imagen2"</span> runat=<span style="color:#CC0000;">"server"</span>&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp;&lt;/td&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;/tr&gt; </div>
</li>
</ol>
</div>
</div>
</div>
<p>
Si lo anterior deja un espacio entre la imagen 1 y la imagen 2, intenta esto:</p>
<div class="igBar"><span id="lasp-17"><a href="#" onclick="javascript:showPlainTxt('asp-17'); return false;">Clic para mostrar texto plano</a></span></div>
<div class="syntax_hilite"><span class="langName">ASP:</span>
<div id="asp-17">
<div class="asp">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;tr&gt;&lt;td&gt;&lt;asp:Image Id=<span style="color:#CC0000;">"Imagen1"</span> runat=<span style="color:#CC0000;">"server"</span>&gt;&lt;/td&gt;&lt;/tr&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;tr&gt;&lt;td&gt;&lt;asp:Image Id=<span style="color:#CC0000;">"Imagen2"</span> runat=<span style="color:#CC0000;">"server"</span>&gt;&lt;/td&gt;&lt;/tr&gt; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Claro que no debería ser, pero al parecer es algún bug de Internet Explorer.</p>
<p>Ahora bien, si lo que quieres es una solución más confiable, utiliza el siguiente estilo en tu hoja de estilos:</p>
<div class="igBar"><span id="lcss-18"><a href="#" onclick="javascript:showPlainTxt('css-18'); return false;">Clic para mostrar texto plano</a></span></div>
<div class="syntax_hilite"><span class="langName">CSS:</span>
<div id="css-18">
<div class="css">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">img <span style="color: #66cc66;">&#123;</span> <span style="color: #000000; font-weight: bold;">display</span>: <span style="color: #993333;">block</span>; <span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Como por arte de magia, el problema desaparece sin tener que estar eliminando saltos de línea en nuestro código.</p>
<p>Tip obtenido de <a href="http://www.mattpealing.co.uk/ie-leaves-a-gap-between-images-fix.htm">mattPealing</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.viale.mx/2010/07/05/internet-explorer-deja-un-espacio-entre-imagenes/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Exclusive access could not be obtained because the database is in use</title>
		<link>http://www.viale.mx/2010/06/14/exclusive-access-could-not-be-obtained-because-the-database-is-in-use/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=exclusive-access-could-not-be-obtained-because-the-database-is-in-use</link>
		<comments>http://www.viale.mx/2010/06/14/exclusive-access-could-not-be-obtained-because-the-database-is-in-use/#comments</comments>
		<pubDate>Mon, 14 Jun 2010 23:34:27 +0000</pubDate>
		<dc:creator>Pablo Viale</dc:creator>
				<category><![CDATA[ASP.NET 2.0 / 3.5]]></category>
		<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">http://www.viale.mx/?p=441</guid>
		<description><![CDATA[Intentas restaurar una base de datos desde un backup utilizando Microsoft SQL Server Management Studio y te aparece el siguiente error: Restore failed for Server 'TuServidor'.&#160; (Microsoft.SqlServer.SmoExtended) System.Data.SqlClient.SqlError: Exclusive access could not be obtained because the database is in use. (Microsoft.SqlServer.Smo) Lo que ocurre es que la base de datos está abierta por otro proceso [...]]]></description>
			<content:encoded><![CDATA[<p>Intentas restaurar una base de datos desde un backup utilizando Microsoft SQL Server Management Studio y te aparece el siguiente error:</p>
<p>Restore failed for Server 'TuServidor'.&#160; (Microsoft.SqlServer.SmoExtended)</p>
<p>System.Data.SqlClient.SqlError: Exclusive access could not be obtained because the database is in use. (Microsoft.SqlServer.Smo)</p>
<p>Lo que ocurre es que la base de datos está abierta por otro proceso y debes cerrar todas las conexiones. Para hacerlo, abre una ventana de Query y coloca lo siguiente:</p>
<div class="igBar"><span id="lsql-20"><a href="#" onclick="javascript:showPlainTxt('sql-20'); return false;">Clic para mostrar texto plano</a></span></div>
<div class="syntax_hilite"><span class="langName">SQL:</span>
<div id="sql-20">
<div class="sql">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #993333; font-weight: bold;">USE</span> master</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">go</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #993333; font-weight: bold;">ALTER</span> <span style="color: #993333; font-weight: bold;">DATABASE</span> nombre_de_tu_base_de_datos <span style="color: #993333; font-weight: bold;">SET</span> single_user <span style="color: #993333; font-weight: bold;">WITH</span> rollback immediate</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #993333; font-weight: bold;">ALTER</span> <span style="color: #993333; font-weight: bold;">DATABASE</span> nombre_de_tu_base_de_datos <span style="color: #993333; font-weight: bold;">SET</span> multi_user </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Este script fue tomado de un <a href="http://geeks.ms/blogs/sergiotarrillo/archive/2007/07/28/23933.aspx">excelente post escrito por Sergio Tarrillo</a>, en el cual puedes encontrar soluciones adicionales para este problema.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.viale.mx/2010/06/14/exclusive-access-could-not-be-obtained-because-the-database-is-in-use/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>C&#243;mo hacer una p&#225;gina que cierre la sesi&#243;n</title>
		<link>http://www.viale.mx/2010/06/01/como-hacer-una-pagina-que-cierre-la-sesion/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=como-hacer-una-pagina-que-cierre-la-sesion</link>
		<comments>http://www.viale.mx/2010/06/01/como-hacer-una-pagina-que-cierre-la-sesion/#comments</comments>
		<pubDate>Tue, 01 Jun 2010 16:31:19 +0000</pubDate>
		<dc:creator>Pablo Viale</dc:creator>
				<category><![CDATA[ASP.NET 2.0 / 3.5]]></category>

		<guid isPermaLink="false">http://www.viale.mx/2010/06/01/cmo-hacer-una-pgina-que-cierre-la-sesin/</guid>
		<description><![CDATA[Para cerrar sesión en una aplicación de ASP.NET puedes utilizar el control LoginStatus, sin embargo en ocasiones querrás que esto ocurra al acceder una página, por ejemplo CerrarSesion.aspx.&#160; Para hacerlo coloca lo siguiente en el code-behind de dicha página: Clic para mostrar texto plano VB.NET: Protected Sub Page_Load&#40;ByVal sender As Object, ByVal e As System.EventArgs&#41; [...]]]></description>
			<content:encoded><![CDATA[<p>Para cerrar sesión en una aplicación de ASP.NET puedes utilizar el control <code>LoginStatus</code>, sin embargo en ocasiones querrás que esto ocurra al acceder una página, por ejemplo CerrarSesion.aspx.&#160; Para hacerlo coloca lo siguiente en el <code>code-behind</code> de dicha página:</p>
<div class="igBar"><span id="lvbnet-22"><a href="#" onclick="javascript:showPlainTxt('vbnet-22'); return false;">Clic para mostrar texto plano</a></span></div>
<div class="syntax_hilite"><span class="langName">VB.NET:</span>
<div id="vbnet-22">
<div class="vbnet">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Protected <span style="color: #0600FF;">Sub</span> Page_Load<span style="color: #000000;">&#40;</span><span style="color: #FF8000;">ByVal</span> sender <span style="color: #FF8000;">As</span> <span style="color: #FF0000;">Object</span>, <span style="color: #FF8000;">ByVal</span> e <span style="color: #FF8000;">As</span> System.<span style="color: #0000FF;">EventArgs</span><span style="color: #000000;">&#41;</span> <span style="color: #FF8000;">Handles</span> <span style="color: #FF8000;">Me</span>.<span style="color: #0000FF;">Load</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;FormsAuthentication.<span style="color: #0000FF;">SignOut</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Session.<span style="color: #0000FF;">Clear</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Session.<span style="color: #0000FF;">Abandon</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Response.<span style="color: #0000FF;">Redirect</span><span style="color: #000000;">&#40;</span>FormsAuthentication.<span style="color: #0000FF;">LoginUrl</span><span style="color: #000000;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp;<span style="color: #0600FF;">End</span> <span style="color: #0600FF;">Sub</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p>  </p>
<p>Y listo, con eso cierras la autenticación, limpias y abandonas la sesión, y redireccionas a la página de login.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.viale.mx/2010/06/01/como-hacer-una-pagina-que-cierre-la-sesion/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Saving changes is not permitted en SQL Server</title>
		<link>http://www.viale.mx/2010/03/01/saving-changes-is-not-permitted-sql-server/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=saving-changes-is-not-permitted-sql-server</link>
		<comments>http://www.viale.mx/2010/03/01/saving-changes-is-not-permitted-sql-server/#comments</comments>
		<pubDate>Mon, 01 Mar 2010 16:43:03 +0000</pubDate>
		<dc:creator>Pablo Viale</dc:creator>
				<category><![CDATA[ASP.NET 2.0 / 3.5]]></category>
		<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">http://www.viale.mx/?p=397</guid>
		<description><![CDATA[Trabajando en una instalación limpia de SQL Server 2008, si intentas modificar la estructura de una tabla, puedes encontrarte este error al intentarla guardar: Saving changes is not permitted. The changes you have made require the following tables to be dropped and re-created. You have either made changes to a table that can't be re-created [...]]]></description>
			<content:encoded><![CDATA[<p>Trabajando en una instalación limpia de SQL Server 2008, si intentas modificar la estructura de una tabla, puedes encontrarte este error al intentarla guardar:</p>
<p><em>Saving changes is not permitted. The changes you have made require the following tables to be dropped and re-created. You have either made changes to a table that can't be re-created or enabled the option Prevent saving changes that require the table to be re-created.</em></p>
<p><a href="http://www.viale.mx/wp-content/uploads/2010/03/saving-not-permitted.gif"><img class="alignnone size-full wp-image-398" title="saving-not-permitted" src="http://www.viale.mx/wp-content/uploads/2010/03/saving-not-permitted.gif" alt="saving-not-permitted" width="455" height="365" /></a></p>
<p>Si oprimes <code>Cancel</code>, no se guarda ningún cambio.</p>
<p>La solución es muy sencilla, abre <em>Microsoft SQL Server Management Studio</em> y haz clic en el menú <em>Tools</em>, y luego en <em>Options</em>.</p>
<p>Después en la columna izquierda selecciona <em>Designers</em> y desmarca la casilla <em>Prevent saving changes that require table re-creation</em>.</p>
<p><a href="http://www.viale.mx/wp-content/uploads/2010/03/prevent.gif"><img class="alignnone size-full wp-image-399" title="prevent" src="http://www.viale.mx/wp-content/uploads/2010/03/prevent.gif" alt="prevent" width="644" height="375" /></a></p>
<p>Y listo, ahora podrás modificar tu tabla y guardar los cambios.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.viale.mx/2010/03/01/saving-changes-is-not-permitted-sql-server/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Cómo posicionar verticalmente una página después de un PostBack</title>
		<link>http://www.viale.mx/2010/02/18/como-posicionar-verticalmente-una-pagina-despues-de-un-postback/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=como-posicionar-verticalmente-una-pagina-despues-de-un-postback</link>
		<comments>http://www.viale.mx/2010/02/18/como-posicionar-verticalmente-una-pagina-despues-de-un-postback/#comments</comments>
		<pubDate>Thu, 18 Feb 2010 23:56:22 +0000</pubDate>
		<dc:creator>Pablo Viale</dc:creator>
				<category><![CDATA[ASP.NET 2.0 / 3.5]]></category>

		<guid isPermaLink="false">http://www.viale.mx/?p=387</guid>
		<description><![CDATA[En ocasiones tenemos un control de ASP.NET (por ejemplo un DataGrid o un DataPager) que está posicionado verticalmente en la mitad de una página, lo que significa que el visitante tuvo que haber desplazado la barra de desplazamiento (scrollbar) hacia abajo para llegar a ese punto. Si este control realiza un PostBack, cuando la página [...]]]></description>
			<content:encoded><![CDATA[<p>En ocasiones tenemos un control de ASP.NET (por ejemplo un <code>DataGrid</code> o un <code>DataPager</code>) que está posicionado verticalmente en la mitad de una página, lo que significa que el visitante tuvo que haber desplazado la barra de desplazamiento (<code>scrollbar</code>) hacia abajo para llegar a ese punto.  Si este control realiza un <code>PostBack</code>, cuando la página regresa al navegador, se muestra la parte superior de la página, sacando al visitante de contexto ya que tendría que volver a utilizar la barra de desplazamiento para visualizar el control. Esto no es nada amigable.</p>
<p>Para realizar el salto al punto vertical que decidas, coloca en ese lugar un ancla:</p>
<div class="igBar"><span id="lasp-26"><a href="#" onclick="javascript:showPlainTxt('asp-26'); return false;">Clic para mostrar texto plano</a></span></div>
<div class="syntax_hilite"><span class="langName">ASP:</span>
<div id="asp-26">
<div class="asp">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;a name=<span style="color:#CC0000;">"proyectos"</span> /&gt; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Después agrega en el <code>code-behind</code> de tu página este procedimiento:</p>
<div class="igBar"><span id="lvbnet-27"><a href="#" onclick="javascript:showPlainTxt('vbnet-27'); return false;">Clic para mostrar texto plano</a></span></div>
<div class="syntax_hilite"><span class="langName">VB.NET:</span>
<div id="vbnet-27">
<div class="vbnet">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #FF8000;">Private</span> <span style="color: #0600FF;">Sub</span> RegistraScriptParaAncla<span style="color: #000000;">&#40;</span><span style="color: #FF8000;">ByVal</span> strAnchorID <span style="color: #FF8000;">As</span> <span style="color: #FF8000;">String</span><span style="color: #000000;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">Dim</span> Script <span style="color: #FF8000;">As</span> <span style="color: #FF8000;">String</span> = <span style="color: #808080;">""</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; Script &amp;= <span style="color: #808080;">"&lt;script language=JavaScript id='BookMarkScript'&gt;"</span> &amp; vbCrLf</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; Script &amp;= <span style="color: #808080;">"var hashValue='#"</span> &amp; strAnchorID &amp; <span style="color: #808080;">"';"</span> &amp; vbCrLf</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; Script &amp;= <span style="color: #808080;">"if(location.hash!=hashValue)"</span> &amp; vbCrLf</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; Script &amp;= <span style="color: #808080;">"location.hash=hashValue;"</span> &amp; vbCrLf</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; Script &amp;= <span style="color: #808080;">"&lt;/script&gt;"</span> &amp; vbCrLf</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">If</span> <span style="color: #000000;">&#40;</span><span style="color: #804040;">Not</span> Page.<span style="color: #0000FF;">ClientScript</span>.<span style="color: #0000FF;">IsStartupScriptRegistered</span><span style="color: #000000;">&#40;</span><span style="color: #808080;">"BookMarkScript"</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> <span style="color: #FF8000;">Then</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Page.<span style="color: #0000FF;">ClientScript</span>.<span style="color: #0000FF;">RegisterStartupScript</span><span style="color: #000000;">&#40;</span><span style="color: #FF8000;">Me</span>.<span style="color: #804040;">GetType</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, <span style="color: #808080;">"BookMarkScript"</span>, Script<span style="color: #000000;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">End</span> <span style="color: #0600FF;">If</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0600FF;">End</span> <span style="color: #0600FF;">Sub</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Ahora, en alguna parte de tu <code>code-behind</code> que se ejecute en el <code>PostBack</code>, por ejemplo, al presionar un botón o la liga de un paginador, manda a llamar la función, de esta manera:</p>
<div class="igBar"><span id="lvbnet-28"><a href="#" onclick="javascript:showPlainTxt('vbnet-28'); return false;">Clic para mostrar texto plano</a></span></div>
<div class="syntax_hilite"><span class="langName">VB.NET:</span>
<div id="vbnet-28">
<div class="vbnet">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">RegistraScriptParaAncla<span style="color: #000000;">&#40;</span><span style="color: #808080;">"proyectos"</span><span style="color: #000000;">&#41;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Puedes tener varias anclas y hacer que la página se desplace a diferentes puntos basado en diferentes condiciones.</p>
<p>Este truco funciona perfectamente y el crédito es para el autor (y los que comentaron) <a href="http://geekswithblogs.net/jawad/archive/2005/05/25/BookMarkJump.aspx">de este post</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.viale.mx/2010/02/18/como-posicionar-verticalmente-una-pagina-despues-de-un-postback/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>User, group, or role already exists in the current database.</title>
		<link>http://www.viale.mx/2010/01/08/user-group-or-role-already-exists-in-the-current-database/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=user-group-or-role-already-exists-in-the-current-database</link>
		<comments>http://www.viale.mx/2010/01/08/user-group-or-role-already-exists-in-the-current-database/#comments</comments>
		<pubDate>Fri, 08 Jan 2010 23:20:57 +0000</pubDate>
		<dc:creator>Pablo Viale</dc:creator>
				<category><![CDATA[ASP.NET 2.0 / 3.5]]></category>
		<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">http://www.viale.mx/?p=376</guid>
		<description><![CDATA[Seguramente te ha pasado que al migrar una base de datos de SQL Server de un servidor a otro, haces tu backup usando Microsoft SQL Server Management Studio, transfieres el archivo, y haces el restore en el nuevo servidor. Todo parece perfecto, pero cuando vas a crear tu usuario obtienes el siguiente error: User, group, [...]]]></description>
			<content:encoded><![CDATA[<p>Seguramente te ha pasado que al <a href="/2008/04/11/como-restaurar-una-base-de-datos-de-sql-server-en-otro-servidor/">migrar una base de datos de SQL Server de un servidor a otro</a>, haces tu backup usando <code>Microsoft SQL Server Management Studio</code>, transfieres el archivo, y haces el restore en el nuevo servidor.  Todo parece perfecto, pero cuando vas a crear tu usuario obtienes el siguiente error:</p>
<p><a href="http://www.viale.mx/wp-content/uploads/2010/01/error1.gif"><img src="http://www.viale.mx/wp-content/uploads/2010/01/error1.gif" alt="error1" title="error1" width="621" height="209" class="alignnone size-full wp-image-377" /></a></p>
<p><code>User, group, or role '' already exists in the current database. (Microsoft SQL Server, Error: 15023)</code></p>
<p>Entonces expandes tu base de datos, vas al nodo Security -> Users ->, buscas el usuario, y lo intentas borrar, pero entonces aparece otro error:</p>
<p><a href="http://www.viale.mx/wp-content/uploads/2010/01/error2.gif"><img src="http://www.viale.mx/wp-content/uploads/2010/01/error2.gif" alt="error2" title="error2" width="621" height="209" class="alignnone size-full wp-image-378" /></a></p>
<p><code>Drop failed for User ''.  (Microsoft.SqlServer.Smo). The database principal owns a database role and cannot be dropped. (Microsoft SQL Server, Error: 15421)</code></p>
<p>En este punto te das cuenta de que el usuario está "huérfano" (orphaned), y una solución para darle la vuelta al problema es crear un nuevo usuario con otro nombre, asignarlo a la base de datos, y modificar el nombre del usuario en el <code>Connection String</code> de tu aplicación.</p>
<p>Pero existe una manera de solucionar las cosas correcta y fácilmente.</p>
<p>Abre una ventana de <code>query</code> en tu base de datos y teclea lo siguiente para ver los usuarios huérfanos:</p>
<div class="igBar"><span id="lsql-32"><a href="#" onclick="javascript:showPlainTxt('sql-32'); return false;">Clic para mostrar texto plano</a></span></div>
<div class="syntax_hilite"><span class="langName">SQL:</span>
<div id="sql-32">
<div class="sql">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">EXEC sp_change_users_login <span style="color: #ff0000;">'Report'</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Si ves a tu usuario ahí significa que efectivamente está huérfano y para deshuerfanizarlo <img src='http://www.viale.mx/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  teclea lo siguiente:</p>
<div class="igBar"><span id="lsql-33"><a href="#" onclick="javascript:showPlainTxt('sql-33'); return false;">Clic para mostrar texto plano</a></span></div>
<div class="syntax_hilite"><span class="langName">SQL:</span>
<div id="sql-33">
<div class="sql">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">EXEC sp_change_users_login <span style="color: #ff0000;">'Auto_Fix'</span>, <span style="color: #ff0000;">'user'</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Modificando <code>user</code> por el nombre de tu usuario.</p>
<p>Y listo, asunto totalmente solucionado, no tienes que crear nuevos usuarios ni modificar las <code>Connection Strings</code> de tus aplicaciones.</p>
<p>Por último, si quieres crear un nuevo usuario para esta base de datos, usa:</p>
<div class="igBar"><span id="lsql-34"><a href="#" onclick="javascript:showPlainTxt('sql-34'); return false;">Clic para mostrar texto plano</a></span></div>
<div class="syntax_hilite"><span class="langName">SQL:</span>
<div id="sql-34">
<div class="sql">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">EXEC sp_change_users_login <span style="color: #ff0000;">'Auto_Fix'</span>, <span style="color: #ff0000;">'user'</span>, <span style="color: #ff0000;">'login'</span>, <span style="color: #ff0000;">'password'</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Referencia: <a href="http://stupidprogrammer.com/2009/02/20/user-already-exists-in-the-current-database/">Stupid Programmer</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.viale.mx/2010/01/08/user-group-or-role-already-exists-in-the-current-database/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

