Showing posts with label aspnet. Show all posts
Showing posts with label aspnet. Show all posts

Monday, March 26, 2012

Tables Asp.Net Visible property

Hi guys,
im having serious trouble with my tables in asp.net. i inherited a
system that allowed me to set my tables visble property to true and
false. When i try and create a table using html i do not have that
property.
does anyone know of a different way to create a table '
the system i inherited with the visible property in the tables uses
the following in the top part of the code -
system.web.ui.htmlcontrols.htmltable
is this the reason for the extra property '
my tables dont seem to have this in the code.
thanks
CGHy,
put an asp:panel around your table and you can set the visible property.
<asp:panel id="pan" runat="server">
<table>
<tr>
<td></td>
</tr>
</table>
</asp:panel>
Greez
The Filzmeister
Colin Graham schrieb:
> Hi guys,
> im having serious trouble with my tables in asp.net. i inherited a
> system that allowed me to set my tables visble property to true and
> false. When i try and create a table using html i do not have that
> property.
> does anyone know of a different way to create a table '
> the system i inherited with the visible property in the tables uses
> the following in the top part of the code -
> system.web.ui.htmlcontrols.htmltable
> is this the reason for the extra property '
> my tables dont seem to have this in the code.
> thanks
> CG
You can operate with css rules display and visibility.
Eliyahu
"Colin Graham" <csgraham74@.hotmail.com> wrote in message
news:ee261922.0504210322.483c2912@.posting.google.com...
> Hi guys,
> im having serious trouble with my tables in asp.net. i inherited a
> system that allowed me to set my tables visble property to true and
> false. When i try and create a table using html i do not have that
> property.
> does anyone know of a different way to create a table '
> the system i inherited with the visible property in the tables uses
> the following in the top part of the code -
> system.web.ui.htmlcontrols.htmltable
> is this the reason for the extra property '
> my tables dont seem to have this in the code.
> thanks
> CG
Christian Filzwieser wrote:
> Hy,
> put an asp:panel around your table and you can set the visible
property.
> <asp:panel id="pan" runat="server">
> <table>
> <tr>
> <td></td>
> </tr>
> </table>
> </asp:panel>
>
<asp:PlaceHolder> may be a better choice because it doesn't generate
any contents itself.

Tables Asp.Net Visible property

Hi guys,

im having serious trouble with my tables in asp.net. i inherited a
system that allowed me to set my tables visble property to true and
false. When i try and create a table using html i do not have that
property.

does anyone know of a different way to create a table ??

the system i inherited with the visible property in the tables uses
the following in the top part of the code -
system.web.ui.htmlcontrols.htmltable
is this the reason for the extra property ??

my tables dont seem to have this in the code.

thanks

CGHy,
put an asp:panel around your table and you can set the visible property.

<asp:panel id="pan" runat="server">
<table>
<tr>
<td></td>
</tr>
</table>
</asp:panel
Greez
The Filzmeister

Colin Graham schrieb:
> Hi guys,
> im having serious trouble with my tables in asp.net. i inherited a
> system that allowed me to set my tables visble property to true and
> false. When i try and create a table using html i do not have that
> property.
> does anyone know of a different way to create a table ??
> the system i inherited with the visible property in the tables uses
> the following in the top part of the code -
> system.web.ui.htmlcontrols.htmltable
> is this the reason for the extra property ??
> my tables dont seem to have this in the code.
> thanks
> CG
You can operate with css rules display and visibility.

Eliyahu

"Colin Graham" <csgraham74@.hotmail.com> wrote in message
news:ee261922.0504210322.483c2912@.posting.google.c om...
> Hi guys,
> im having serious trouble with my tables in asp.net. i inherited a
> system that allowed me to set my tables visble property to true and
> false. When i try and create a table using html i do not have that
> property.
> does anyone know of a different way to create a table ??
> the system i inherited with the visible property in the tables uses
> the following in the top part of the code -
> system.web.ui.htmlcontrols.htmltable
> is this the reason for the extra property ??
> my tables dont seem to have this in the code.
> thanks
> CG
Christian Filzwieser wrote:
> Hy,
> put an asp:panel around your table and you can set the visible
property.
> <asp:panel id="pan" runat="server">
> <table>
> <tr>
> <td></td>
> </tr>
> </table>
> </asp:panel
<asp:PlaceHolder> may be a better choice because it doesn't generate
any contents itself.

tables in asp.net

I am using Visual Microsoft Web developer express. I am using tables to control layouts, and I have hard time controlling tables. In the design view, the layout looks perfect, but actual display of the layout on a browser is horrendous. Design view and actual view are different.

Yup. You'll also find that different browsers will display differently as well. You can live with it, control the layout precisely with specific width and height attributes as well as font sizing and hope it works in most browser, or work with CSS instead of tables. But it's the nature of the environment, you don't control what the user sees, the user and the user's browser does.

Jeff


i would have loved the older way. ie coding it and not using the design way. so that u get a better control of where you want to put the control

Tablet PC for ASP.NET Development

Hello,
I want to replace my old laptop PC with a Tablet PC. I'mwondering if Tablet PC Windows XP has IIS and similar web developmentfeatures activated like in Window XP Pro?
I'm hoping that I can use the Tablet PC to develop my ASP.NET webapplications on the go, just as I currently do on my laptop with XPPro. Does anyone have experience developing on a Tablet PC? If so, any major drawbacks?
I know this isn't the ideal setup. I have a desktop PC that I usefor day-to-day development work...the Tablet PC would be my secondcomputer that'd I develop on when I'm traveling or want to get out ofthe house/office.
Thanks!
Rob
PS. This is for ASP.NET 1.1 development primarily...only occasionally working with ASP.NET 2.0
I've heard of some people using the bigger/more powerful TabletPCs for dev work without any problems. For occasional work that should work very well.
Hth,

Tabs in ASP.Net

I am looking for a way to add tabs to my asp.net pages. I saw an
application that had tabs on it. It seem as they did it with javascript,
because when you click on each tab. It didn't post back to the server to
load the tab information.

Any Suggestions?
MarkIt can be done on the client side using divs which are positioned one on top
of the other, and by changing the Z-order of the divs.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
What You Seek Is What You Get.

"SouthSpawn" <southspawn@.aol.com> wrote in message
news:1405e751c119caa9997ebc3d65258101@.localhost.ta lkaboutsoftware.com...
>I am looking for a way to add tabs to my asp.net pages. I saw an
> application that had tabs on it. It seem as they did it with javascript,
> because when you click on each tab. It didn't post back to the server to
> load the tab information.
> Any Suggestions?
> Mark
> I am looking for a way to add tabs to my asp.net pages. I saw an
> application that had tabs on it. It seem as they did it with javascript,
> because when you click on each tab. It didn't post back to the server to
> load the tab information.

Right. There is no such thing as 'tabs' in HTML. So, you need to fake it. If
you want it to work all client-side, then you need to use Javascript.

Typically, you have a variety of links and then you use a javascript
function to swap the CSS display: attribute for each 'panel' from BLOCK to
NONE.

-Darrel
Kevin,

Can you give me a small code example of this?

Mark
Hi Mark,

I'm afraid I don't have one. I just know what the tools are, and how to use
them. I could write one, but then again, so could you. You would have to do
the same thing I would: Look up information on the HTML div element, and use
that.

I have a lot of general information in my head, but when it comes to
specifics, I have to look things up just like everybody else. God forbid I
should have to memorize the entire CLR, or the entire HTML DOM! I only know
enough to know what toool to use, not necessarily all the details about
implementing the tool. For that, I rely on my extensive ever-growing
reference library.

For example, the MSDN Library has a complete reference on the HTML DOM. And
Google is my home page! ;-)

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
What You Seek Is What You Get.

"SouthSpawn" <southspawn@.aol.com> wrote in message
news:bd6bdd601af05a79327eac771304fb75@.localhost.ta lkaboutsoftware.com...
> Kevin,
> Can you give me a small code example of this?
> Mark
> Can you give me a small code example of this?

This isn't for tabs, but the concept is the same. Save the below as an HTML
file and then open in your browser to see how things work...

================================================== ==========================
==

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>Javascript DIV toggle</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /
<script language=javascript type='text/javascript'
// Toggle function graciously provided by Mick White
// be sure to change the path to the close.gif file to match your directly
setup

function toggle(id){
var toggleLink = id + 'Toggle';
if(document.getElementById){
document.getElementById(id).style.display=
document.getElementById(id).style.display == "block"? "none":"block"
document.getElementById(toggleLink).style.backgrou ndImage=
document.getElementById(id).style.display == "block"?
"url(close.gif)":"url(open.gif)"
return;
}

}

function hideTextBlock(id){
if(document.getElementById){
document.getElementById(id).style.display = "none"
return;
}

}

function writeOutToggleLink(spanID, id, linkedText){
document.getElementById(spanID).innerHTML = '<a href="http://links.10026.com/?link=javascript:void(0)"
onClick="toggle(\'details' + id + '\')" id="details' + id + 'Toggle"
class="detailsToggleLink">' + linkedText + '</a>'
}

//================================================== ==========

</script
<style type="text/css"
..details {
text-align: left;
background-color: #ffc;
padding: 10px;
border: 1px solid #cc9;
padding: 5px;
}

/* the open.gif is an icon that shows before the link to indicate that the
text block is now visible */

a.detailsToggleLink, a.detailsToggleLink:hover, a.detailsToggleLink:visited,
a.detailsToggleLink:active {
background: url("open.gif");
color: #666;
text-decoration: none;
border-bottom: 1px dashed #999;
background-repeat: no-repeat;
background-position: 0px 2px;
padding-left: 12px;
}

/* the following styles are just for this page...not needed for the
javascript to work */

body {
background-color: white;
font-family: verdana;
line-height: 150%;
padding: 15px 10%;
}

code {
font-family: monospace;
background-color: #FFFFCC;
border: 1px solid #666;
padding: 10px;
margin: 10px 30px;
display: block;
}

</style
</head
<body onload="writeOutToggleLink('appleToggleSpan', 'Apple', 'Tell me
more');hideTextBlock('detailsApple');writeOutToggl eLink('orangeToggleSpan',
'Orange', 'Tell me more');hideTextBlock('detailsOrange');"
<h1>Javascript DIV toggle</h1
<div class="content"
<h3>How this works</h3
<p>Javascript is used to change the style sheet on the fly for each hidden
block of text. By default, it is set to display: hidden. The javascript link
changes it to display: block, thereby making it visible on the page</p
<p>This has been tested in IE 6/PC and Firefox. It may not work on other
browsers.</p
<p>For each block of text you want to show/hide, you need a 'toggle' link to
call the javascript function that, in turns, changes the CSS of the text
block so that it becomes visible or not visible:
</p>
<code><a href="javascript:void(0)"
onClick="toggle('details[ID]')" id="details[ID]Toggle"
class="detailsToggleLink">Tell
me more</a></code
<p>HOWEVER, we will not actually be placing the above HTML link in our
source code. Instead, we're going to insert the above link via javascript
into an empty SPAN tag. Each 'tell me more' link is actually an empty SPAN
tag. When the page loads, IF the person has javascript, these SPAN tags get
filled with the toggle link that shows/hides the block of text. (if you
don't have javascript, then the toggle links wouldn't do anyting, so there
is no point in showing them to folks that don't have javascript):</p
<code> <span id="[id]ToggleSpan"></span></code
<p>And each block of content you want toggled on and off will have be
wrapped in a div that looks like this:</p>
<code><div id="details[ID]"
class="details"></code
<p>For each toggle set (link + block of text) you need to replace the
'[ID]' in the above code with a unique word. This allows the main javascript
function to uniquely identify each set an only enact upon that particular
set at a time.</p
<p>Then, to put it all together, we need to call some events in the BODY
tag when the page loads. For each set of toggle links + text block, we need
to do two things. First, we need to insert the HTML link into the empty SPAN
tags. Secondly, we need to hide the text boxes when the page first loads. We
do this so that if a person doesn't have javascript, they don't see the
links, and the text isn't hidden from them.</p
<code> <body onload="writeOutToggleLink('[ID]ToggleSpan', 'Apple',
'Tell me more');hideTextBlock('details[ID]');"></code>
<p>The above functions are written as such:</p>
<p>writeOutToggleLink(the ID of the span you want the link inserted into,
the keyword you are using for this set, the actual text of the link)</p>
<p>hideTextBlock(the DIV ID of the text block)</p>
<p>You will need to call each of those functions for each of the sets of
links/textblocks that you have on the page.</p>
<hr
<p>Sample Link 1 (using ID of 'Apple')
<span id="appleToggleSpan"></span></p
<div id="detailsApple" class="details">Lorem ipsum dolor sit amet,
consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut
laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam,
quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex
ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in.</div
<p>Sample Link 2 (using ID of 'orange') <span
id="orangeToggleSpan"></span></p
<div id="detailsOrange" class="details">Lorem ipsum dolor sit amet,
consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut
laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam,
quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex
ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in.</div
</div
</body
</html
"SouthSpawn" <southspawn@.aol.com> wrote in
news:1405e751c119caa9997ebc3d65258101@.localhost.ta lkaboutsoftware.com:

> I am looking for a way to add tabs to my asp.net pages. I saw an
> application that had tabs on it. It seem as they did it with javascript,
> because when you click on each tab. It didn't post back to the server to
> load the tab information.
> Any Suggestions?

ASP.NET's IE Controls does have a tab control... but it's IE specific.

Do a google search for Javascript Tabs, you'll find several examples : )

--
Lucas Tam (REMOVEnntp@.rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/

Tabs in an ASP.NET Application

Does anyone havea good article on how to setup Tabs in an ASP.NET
application? (VB.NET)

I am having a hard time understanding how it works and where to begin. Any
insight would be greatly appreciated.DOTNETGUY wrote:
> Does anyone havea good article on how to setup Tabs in an ASP.NET
> application? (VB.NET)
> I am having a hard time understanding how it works and where to begin. Any
> insight would be greatly appreciated.

Tabs as in hitting the TAB key, or tabs as in a tabbed form?

--
Curt Christianson
site: http://www.darkfalz.com
blog: http://blog.darkfalz.com
Tabbed forms...sorry.

"Curt_C [MVP]" wrote:

> DOTNETGUY wrote:
> > Does anyone havea good article on how to setup Tabs in an ASP.NET
> > application? (VB.NET)
> > I am having a hard time understanding how it works and where to begin. Any
> > insight would be greatly appreciated.
> Tabs as in hitting the TAB key, or tabs as in a tabbed form?
> --
> Curt Christianson
> site: http://www.darkfalz.com
> blog: http://blog.darkfalz.com
DOTNETGUY wrote:
> Tabbed forms...sorry.

We built our own tabbed form. Basically it was single row of table cells
where the click posted back and determined what to show in the bottom
half. We also did a version with no postback that used div's with
hide/show specified with the onclick() events of the hrefs used in the
"tab" cells.

--
Curt Christianson
site: http://www.darkfalz.com
blog: http://blog.darkfalz.com
Has anyone created something like this Tab / Multi-page control form that
uses generic object such that it can be used in Netscape, Opera, Mozilla,
etc? The IE Webcontrols only work with, of course, IE.

"Curt_C [MVP]" <software_at_darkfalz.com> wrote in message
news:OefC%23gjgFHA.3692@.TK2MSFTNGP09.phx.gbl...
> DOTNETGUY wrote:
> > Tabbed forms...sorry.
> We built our own tabbed form. Basically it was single row of table cells
> where the click posted back and determined what to show in the bottom
> half. We also did a version with no postback that used div's with
> hide/show specified with the onclick() events of the hrefs used in the
> "tab" cells.
>
> --
> Curt Christianson
> site: http://www.darkfalz.com
> blog: http://blog.darkfalz.com

Tabs in ASP.NET 2.0

Hello,

Question for all the .NET gurus. I would like to implement tabs in the web application I'm developing. Many that I've talked to and read are pointing me in the direction of AJAX. I would rather wait for another release of AJAX before I start using it, but my question is: Isn't tabs available in ASP.NET 2.0without getting AJAX? For example, when I go to the built in ASP.NET Web Administration Tool it obviously uses tabs and looks like it is built using ASP.NET 2.0 only. I like the look, feel and functionality of the Web Administration tool and want to implement something similiar in my Web Apps. So if this is using it, why can't I without having to get AJAX?

Thanks,

StrickHave a look at the MultiView control.
It kind of depends on what your goal is with the using the tabs.

If it's simply a style of site navigation, it's quite easy to create images and text that duplicate a simple tab look and feel inside a web control. I haven't looked at it closely but I think that's what the ASP.NET configuration web site does in most places. You could then place the control at the top of all of your pages and have it show the right tab for the loaded page. There are plenty of examples around if you Google for them. You can also buy more complex controls that give you more style, functionality, and ease of use options. It really depends on how much you want to code and draw yourself.

If you're wanting a more interactive solution on a single page, you can use the MultiView control to do that. However, you'll still need to code/draw the simulated tabs yourself in much the same way as mentioned above.

AJAX comes into play when you need to have a tabbed display where you want to submit or update parts of a page separate from the rest. For example, you might have an order form where you want to check current inventory levels and warehouse/store locations when a line item is added but you don't want to submit and refresh the whole page to do it.
Thanks guys. I'm going to look into the multiview. Really, I just want it to do the exact same thing that the windows tab control does. Hopefully I won't have to simulate a tab control. If that's the case, I might as well just have separate pages for each hyperlink. I want the multiview to save me the time of having to have separate pages.

Thanks,

Strick
I like the look, feel and functionality of the Web Administration tool and want to implement something similiar in my Web Apps.

The complete source code for the admin tool is in the following folder

C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\ASP.NETWebAdminFiles
Nice, I'll take a look at that. Thanks!
this seems pretty cool:

http://ajax.asp.net/ajaxtoolkit/Tabs/Tabs.aspx
Yeah, I actually downloaded and played with AJAX a little bit last week. It seems really cool. It just seems like it's not integrated into VS 2005 like it should be. I was gonna wait for another version before I start really using it (which is usually my rule of thumb with brand new microsoft products, lol!), but maybe I'll break my rule for AJAX. Maybe I should go get an AJAX book and read it cover to cover...lol. Any recommendations on books?
Yeah, I actually downloaded and played with AJAX a little bit last week. It seems really cool. It just seems like it's not integrated into VS 2005 like it should be. I was gonna wait for another version before I start really using it (which is usually my rule of thumb with brand new microsoft products, lol!), but maybe I'll break my rule for AJAX. Maybe I should go get an AJAX book and read it cover to cover...lol. Any recommendations on books?
if you go to this link:
http://asp.net/learn/videos/default.aspx?tabid=63

and watch the first 2 vids, they will show you how to put the ajax resources and the AjaxConrolToolkit right inside of your toolbox. That makes them pretty much drag n' drop. I couldn't ask for much more integrated. ;)
U know what sucks now? I'm all ready to learn AJAX and the web host I'm with doesn't even support it yet
Well I think in this situation, u better to use MultiView or LoadControl Method either.

Tabs in ASP.Net

I am looking for a way to add tabs to my asp.net pages. I saw an
application that had tabs on it. It seem as they did it with javascript,
because when you click on each tab. It didn't post back to the server to
load the tab information.
Any Suggestions?
MarkIt can be done on the client side using divs which are positioned one on top
of the other, and by changing the Z-order of the divs.
HTH,
Kevin Spencer
Microsoft MVP
.Net Developer
What You S Is What You Get.
"SouthSpawn" <southspawn@.aol.com> wrote in message
news:1405e751c119caa9997ebc3d65258101@.lo
calhost.talkaboutsoftware.com...
>I am looking for a way to add tabs to my asp.net pages. I saw an
> application that had tabs on it. It seem as they did it with javascript,
> because when you click on each tab. It didn't post back to the server to
> load the tab information.
> Any Suggestions?
> Mark
>
> I am looking for a way to add tabs to my asp.net pages. I saw an
> application that had tabs on it. It seem as they did it with javascript,
> because when you click on each tab. It didn't post back to the server to
> load the tab information.
Right. There is no such thing as 'tabs' in HTML. So, you need to fake it. If
you want it to work all client-side, then you need to use Javascript.
Typically, you have a variety of links and then you use a javascript
function to swap the CSS display: attribute for each 'panel' from BLOCK to
NONE.
-Darrel
Kevin,
Can you give me a small code example of this?
Mark
Hi Mark,
I'm afraid I don't have one. I just know what the tools are, and how to use
them. I could write one, but then again, so could you. You would have to do
the same thing I would: Look up information on the HTML div element, and use
that.
I have a lot of general information in my head, but when it comes to
specifics, I have to look things up just like everybody else. God forbid I
should have to memorize the entire CLR, or the entire HTML DOM! I only know
enough to know what toool to use, not necessarily all the details about
implementing the tool. For that, I rely on my extensive ever-growing
reference library.
For example, the MSDN Library has a complete reference on the HTML DOM. And
Google is my home page! ;-)
HTH,
Kevin Spencer
Microsoft MVP
.Net Developer
What You S Is What You Get.
"SouthSpawn" <southspawn@.aol.com> wrote in message
news:bd6bdd601af05a79327eac771304fb75@.lo
calhost.talkaboutsoftware.com...
> Kevin,
> Can you give me a small code example of this?
> Mark
>
> Can you give me a small code example of this?
This isn't for tabs, but the concept is the same. Save the below as an HTML
file and then open in your browser to see how things work...
========================================
====================================
==
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>Javascript DIV toggle</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<script language=javascript type='text/javascript'>
// Toggle function graciously provided by Mick White
// be sure to change the path to the close.gif file to match your directly
setup
function toggle(id){
var toggleLink = id + 'Toggle';
if(document.getElementById){
document.getElementById(id).style.display=
document.getElementById(id).style.display == "block"? "none":"block"
document.getElementById(toggleLink).style.backgroundImage=
document.getElementById(id).style.display == "block"?
"url(close.gif)":"url(open.gif)"
return;
}
}
function hideTextBlock(id){
if(document.getElementById){
document.getElementById(id).style.display = "none"
return;
}
}
function writeOutToggleLink(spanID, id, linkedText){
document.getElementById(spanID).innerHTML = '<a href="http://links.10026.com/?link=java script:void(0)"
onClick="toggle('details' + id + '')" id="details' + id + 'Toggle"
class="detailsToggleLink">' + linkedText + '</a>'
}
// ========================================
====================
</script>
<style type="text/css">
.details {
text-align: left;
background-color: #ffc;
padding: 10px;
border: 1px solid #cc9;
padding: 5px;
}
/* the open.gif is an icon that shows before the link to indicate that the
text block is now visible */
a.detailsToggleLink, a.detailsToggleLink:hover, a.detailsToggleLink:visited,
a.detailsToggleLink:active {
background: url("open.gif");
color: #666;
text-decoration: none;
border-bottom: 1px dashed #999;
background-repeat: no-repeat;
background-position: 0px 2px;
padding-left: 12px;
}
/* the following styles are just for this page...not needed for the
javascript to work */
body {
background-color: white;
font-family: verdana;
line-height: 150%;
padding: 15px 10%;
}
code {
font-family: monospace;
background-color: #FFFFCC;
border: 1px solid #666;
padding: 10px;
margin: 10px 30px;
display: block;
}
</style>
</head>
<body onload="writeOutToggleLink('appleToggleSpan', 'Apple', 'Tell me
more');hideTextBlock('detailsApple');wri
teOutToggleLink('orangeToggleSpan',
'Orange', 'Tell me more');hideTextBlock('detailsOrange');">
<h1>Javascript DIV toggle</h1>
<div class="content">
<h3>How this works</h3>
<p>Javascript is used to change the style sheet on the fly for each hidden
block of text. By default, it is set to display: hidden. The javascript link
changes it to display: block, thereby making it visible on the page</p>
<p>This has been tested in IE 6/PC and Firefox. It may not work on other
browsers.</p>
<p>For each block of text you want to show/hide, you need a 'toggle' link to
call the javascript function that, in turns, changes the CSS of the text
block so that it becomes visible or not visible:
</p>
<code><a href="http://links.10026.com/?link=java script:void(0)"
onClick="toggle('details[ID]')" id="details[ID]Toggle"
class="detailsToggleLink">Tell
me more</a></code>
<p>HOWEVER, we will not actually be placing the above HTML link in our
source code. Instead, we're going to insert the above link via javascript
into an empty SPAN tag. Each 'tell me more' link is actually an empty SPAN
tag. When the page loads, IF the person has javascript, these SPAN tags get
filled with the toggle link that shows/hides the block of text. (if you
don't have javascript, then the toggle links wouldn't do anyting, so there
is no point in showing them to folks that don't have javascript):</p>
<code> <span id="[id]ToggleSpan"></span></code>
<p>And each block of content you want toggled on and off will have be
wrapped in a div that looks like this:</p>
<code><div id="details[ID]"
class="details"></code>
<p>For each toggle set (link + block of text) you need to replace the
'[ID]' in the above code with a unique word. This allows the main javascript
function to uniquely identify each set an only enact upon that particular
set at a time.</p>
<p>Then, to put it all together, we need to call some events in the BODY
tag when the page loads. For each set of toggle links + text block, we need
to do two things. First, we need to insert the HTML link into the empty SPAN
tags. Secondly, we need to hide the text boxes when the page first loads. We
do this so that if a person doesn't have javascript, they don't see the
links, and the text isn't hidden from them.</p>
<code> <body onload=& quot;writeOutToggleLink('[ID]ToggleSpan'
, 'Apple',
'Tell me more');hideTextBlock('details[ID]');"></code>
<p>The above functions are written as such:</p>
<p>writeOutToggleLink(the ID of the span you want the link inserted into,
the keyword you are using for this set, the actual text of the link)</p>
<p>hideTextBlock(the DIV ID of the text block)</p>
<p>You will need to call each of those functions for each of the sets of
links/textblocks that you have on the page.</p>
<hr>
<p>Sample Link 1 (using ID of 'Apple')
<span id="appleToggleSpan"></span></p>
<div id="detailsApple" class="details">Lorem ipsum dolor sit amet,
consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut
laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam,
quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex
ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in.</div>
<p>Sample Link 2 (using ID of 'orange') <span
id="orangeToggleSpan"></span></p>
<div id="detailsOrange" class="details">Lorem ipsum dolor sit amet,
consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut
laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam,
quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex
ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in.</div>
</div>
</body>
</html>
"SouthSpawn" <southspawn@.aol.com> wrote in
news:1405e751c119caa9997ebc3d65258101@.lo
calhost.talkaboutsoftware.com:

> I am looking for a way to add tabs to my asp.net pages. I saw an
> application that had tabs on it. It seem as they did it with javascript,
> because when you click on each tab. It didn't post back to the server to
> load the tab information.
> Any Suggestions?
ASP.NET's IE Controls does have a tab control... but it's IE specific.
Do a google search for Javascript Tabs, you'll find several examples : )
Lucas Tam (REMOVEnntp@.rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
[url]http://members.ebay.com/aboutme/spot18/[/url]

Tabs...

Hi guys and girls,
I have seen the tabs on this page here (http://66.129.71.130/QuickStartv20/aspnet/doc/pages/syntax.aspx#render) to switch from VB to C#. Are those tabs easy to do? Any tips?
Any tip would be great, I am just in the process of moving from PHP to ASP.NET :)Hi,

it's done by setting the display style (css) with client side javascript so it doesn't require a postback to the server. I created some sample code that you might want to check out here:http://forums.asp.net/887783/ShowPost.aspx

Grz, Kris.
Ah, thank you for that example. I think I will be able to work with that...

Saturday, March 24, 2012

Tagging in ASP.NET 2.0 - can anyone help, please?

Hello,

I have found lots of articles explaining how to build tag clouds in ASP.NET, they are very good. I have been looking for a very simple tutorial on how to allow users to tag a database entry like a photo or news article, or anything really, like on this forum - where you add tags for a new post. I can't find any. I'm quite new to this, and I would be really grateful if somone could explain how I can build a page where users can tag stuff, using a single textbox and commas as a separator for each word. Thats the bit which confuses me the most!

Thank you very much!

Jack.

Hi Jack,

There's a few steps involved, so I'll try to keep it short...

First, add a "Tags" table with the following fields to the database that will hold all of your tags:

Tags
- tagID (Integer)(Primary Key)(Identity)
- tagText (varchar(255))

Next, let's assume you already have a table that stores your Articles, and it has a primary key field named: "articleID". You would then create another table to tie multiple tags to an article:

ArticleTags
- articleID (Integer)(Not Null)
- tagID (Integer)(Not Null)

Now, without getting too far into a discussion about good architecture - let's keep things simple. Let's create classes that define our Article, Tag and ArticleTag tables:

public class Article
{
public int articleID;
public string name;
public string body;

public Article(string name, string body)
{
this.name = name;
this.body = body;
}

public void Insert()
{
//code to save an article goes here
//once article is saved, set the generated articleID into this object
this.articleID = ArticleManager.Insert(this);
}
}

public class Tag
{
public int tagID;
public string tagText;

public Tag(string tag)
{
this.tagText = tag;
}

public void Insert()
{
//first, see if tag already exists
Tag tag = TagManager.GetByTagText(this.tagText);
if (tag == null) //assumes that above method returns null if matching tag not found
{
//once tag is saved, set the generated tagID into this object
this.tagID = TagManager.Insert(this);
}
else
{
//tag exists, grab the tagID
this.tagID = tag.tagID;
}
}
}

public class ArticleTag
{
public int articleID;
public int tagID;

public ArticleTag(int articleID, int tagID)
{
this.articleID = articleID;
this.tagID = tagID;
}

public void Insert()
{
ArticleTagManager.Insert(this);
}
}

Let's also create a helper class that holds multiple "Tag" objects:

public class TagList : List<Tag>
{
public TagList() { }
}

OK, that's the backend stuff done. Now all we need to do is get the tags from the user, parse them out and use these classes to save them to the database. Let's assume that we're on a page where we are creating a new Article and Tags for that article at the same time:

After the "Save" button is clicked, so the code goes here:

protected void btnSave_Click(object sender, EventArgs e)
{
//build up the new Article object
Article art = new Article(txtName.Text, txtBody.Text);

//now, let's grab the tags which are seperated by commas
TagList tList = new TagList();
string[] tags = txtTags.Text.Split(',');
//loop through the resulting array
foreach (string t in tags)
{
//first, make sure there's more than just a space
if (t.Trim().Length > 0)
{
Tag tag = new Tag(t.Trim());
//add tag to the list
tList.Add(tag);
}
}
this.mNewTagList = tList;

//now, save article and tags
art.Insert();

//make sure it saved and we have an articleID to use
if (art.articleID > 0)
{
//now save each tag, and create association between the tag and the article
foreach(Tag t in tList)
{
t.Insert();

//make sure we have a tagID to work with
if (t.tagID > 0)
{
//create a new association
ArticleTag at = new ArticleTag(art.articleID, t.tagID);
at.Insert();
}
}
}
}

That's it! Hope that helps!

Chad

Thursday, March 22, 2012

Takes VS 2005 *3 MINUTES* to compile ASP.NET 2.0 website

It takes VS 2005 1, 2, and somtimes 3 MINUTES to compile ASP.NET 2.0 website
when external DLL is modified. As a matter of fact, when I click 'Build',
it looks like VS 2005 hangs for most of that time before it actually starts
compiling. If I modify something inside WebSite project itself without
modifying DLL, it takes few seconds to compile.
Why? How can I control this behavior?
I was able to reproduce this behavior by creating a simple WebSite and
simple DLL that I reference from that WebSite project.Amelyan,
you have posted this message 3 times now, and you accepted
that the explanation which was offered made sense.
But you have not said whether you tried the simple solution posted,
and whether it works or not.
Did you try it ? Does it work ?
Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
Foros de ASP.NET en Espaol : http://asp.net.do/foros/
======================================
"Amelyan" <bamelyan at wi.rr.com> wrote in message
news:eHx9wrV4FHA.268@.TK2MSFTNGP10.phx.gbl...
> It takes VS 2005 1, 2, and somtimes 3 MINUTES to compile ASP.NET 2.0 websi
te when
> external DLL is modified. As a matter of fact, when I click 'Build', it l
ooks like VS
> 2005 hangs for most of that time before it actually starts compiling. If
I modify
> something inside WebSite project itself without modifying DLL, it takes fe
w seconds to
> compile.
> Why? How can I control this behavior?
> I was able to reproduce this behavior by creating a simple WebSite and sim
ple DLL that I
> reference from that WebSite project.
>
Juan,
Yes, I tried the your suggestion. When I remove the old DLL and re-add it
to references every time compile, this process takes even longer. So, this
solution is useless.
"Juan T. Llibre" <nomailreplies@.nowhere.com> wrote in message
news:%23g1x5yV4FHA.2364@.TK2MSFTNGP12.phx.gbl...
> Amelyan,
> you have posted this message 3 times now, and you accepted
> that the explanation which was offered made sense.
> But you have not said whether you tried the simple solution posted,
> and whether it works or not.
> Did you try it ? Does it work ?
>
>
> Juan T. Llibre, ASP.NET MVP
> ASP.NET FAQ : http://asp.net.do/faq/
> Foros de ASP.NET en Espaol : http://asp.net.do/foros/
> ======================================
> "Amelyan" <bamelyan at wi.rr.com> wrote in message
> news:eHx9wrV4FHA.268@.TK2MSFTNGP10.phx.gbl...
>
Have you tried compiling the assembly from within VS ?
Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
Foros de ASP.NET en Espaol : http://asp.net.do/foros/
======================================
"Amelyan" <bamelyan at wi.rr.com> wrote in message
news:eVrkx2V4FHA.4076@.TK2MSFTNGP15.phx.gbl...
> Juan,
> Yes, I tried the your suggestion. When I remove the old DLL and re-add it
to references
> every time compile, this process takes even longer. So, this solution is
useless.
>
> "Juan T. Llibre" <nomailreplies@.nowhere.com> wrote in message
> news:%23g1x5yV4FHA.2364@.TK2MSFTNGP12.phx.gbl...
>
Yes, that is how I am doing it.
"Juan T. Llibre" <nomailreplies@.nowhere.com> wrote in message
news:uKxQT5V4FHA.2872@.TK2MSFTNGP15.phx.gbl...
> Have you tried compiling the assembly from within VS ?
>
> Juan T. Llibre, ASP.NET MVP
> ASP.NET FAQ : http://asp.net.do/faq/
> Foros de ASP.NET en Espaol : http://asp.net.do/foros/
> ======================================
> "Amelyan" <bamelyan at wi.rr.com> wrote in message
> news:eVrkx2V4FHA.4076@.TK2MSFTNGP15.phx.gbl...
>
I must have misunderstood what you meant when
you stated "when external DLL is modified".
I thought "external DLL" referred to a DLL outside your
project since, otherwise, it would be a "project DLL".
So, to recap,
1. you have a web solution
2. you add the DLL solution to that solution
3. you compile the DLL and the web solution sequentially,
from within the *same* solution
or, do you
1. have a web solution
2. have a *different* solution for your DLL
( not included in your web solution)
3. You recompile the DLL
4. you recompile the web solution and that causes the problem you describe
?
Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
Foros de ASP.NET en Espaol : http://asp.net.do/foros/
======================================
"Amelyan" <bamelyan at wi.rr.com> wrote in message
news:eIrxPLW4FHA.2600@.tk2msftngp13.phx.gbl...
> Yes, that is how I am doing it.
> "Juan T. Llibre" <nomailreplies@.nowhere.com> wrote in message
> news:uKxQT5V4FHA.2872@.TK2MSFTNGP15.phx.gbl...
>
I just tried both suggestions. I am still experiencing delays in compiling
event if I include my DLL project inside my WEbSite solution and add it as
project reference.
"Juan T. Llibre" <nomailreplies@.nowhere.com> wrote in message
news:Omql1YW4FHA.2816@.tk2msftngp13.phx.gbl...
>I must have misunderstood what you meant when
> you stated "when external DLL is modified".
> I thought "external DLL" referred to a DLL outside your
> project since, otherwise, it would be a "project DLL".
> So, to recap,
> 1. you have a web solution
> 2. you add the DLL solution to that solution
> 3. you compile the DLL and the web solution sequentially,
> from within the *same* solution
> or, do you
> 1. have a web solution
> 2. have a *different* solution for your DLL
> ( not included in your web solution)
> 3. You recompile the DLL
> 4. you recompile the web solution and that causes the problem you describe
> ?
>
> Juan T. Llibre, ASP.NET MVP
> ASP.NET FAQ : http://asp.net.do/faq/
> Foros de ASP.NET en Espaol : http://asp.net.do/foros/
> ======================================
> "Amelyan" <bamelyan at wi.rr.com> wrote in message
> news:eIrxPLW4FHA.2600@.tk2msftngp13.phx.gbl...
>
Amount of memory on you box? What kind of processor?
Have you checked CPU usage, disk swapping and memory usage during a compile?
What is this "simple" DLL doing?
Did you have a beta previously installed?
If so, are you sure you uninstalled everything completely (some betas
required manual steps to remove)?
There are a lot of variables in the mix, so it is hard to find a solution.
For me, the IDE is a bit slower than VS.NET, but not 3 minutes to compile
(more like a few extra seconds).
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
****************************************
*******
Think Outside the Box!
****************************************
*******
"Amelyan" <bamelyan at wi.rr.com> wrote in message
news:eHx9wrV4FHA.268@.TK2MSFTNGP10.phx.gbl...
> It takes VS 2005 1, 2, and somtimes 3 MINUTES to compile ASP.NET 2.0
> website when external DLL is modified. As a matter of fact, when I click
> 'Build', it looks like VS 2005 hangs for most of that time before it
> actually starts compiling. If I modify something inside WebSite project
> itself without modifying DLL, it takes few seconds to compile.
> Why? How can I control this behavior?
> I was able to reproduce this behavior by creating a simple WebSite and
> simple DLL that I reference from that WebSite project.
>
I have 2GHz processor with 512MB of memory. I never installed beta, I
installed VS2005 final release.
Simple HelloWorld.dll doesn't do much, contains a function that returns a
string.
It does take few extra seconds when I modify my WebSite project internally,
but when I modify external Helloworld.dll, that is what slows down
compilation.
I pulled up OutputWindow in VS2005 to watch the progress of compilation. I
noticed that 95% of that 2-3 minutes time is VS2005 is blocked (not
responding) sitting there with CPU utilization at 2%. Then when it actually
starts compiling, it compiles in normal time.
I guess, from my further observations, when I click the Build button, 95% of
the time VS2005 is doing something before it actually starts compiling
(maybe waiting for some resorse, and at that time not responding to any user
commands or menu clicks). When it actually starts compiling, it takes a few
seconds.
"Cowboy (Gregory A. Beamer)" <NoSpamMgbworld@.comcast.netNoSpamM> wrote in
message news:uotJK$X4FHA.4076@.TK2MSFTNGP15.phx.gbl...
> Amount of memory on you box? What kind of processor?
> Have you checked CPU usage, disk swapping and memory usage during a
> compile?
> What is this "simple" DLL doing?
> Did you have a beta previously installed?
> If so, are you sure you uninstalled everything completely (some betas
> required manual steps to remove)?
> There are a lot of variables in the mix, so it is hard to find a solution.
> For me, the IDE is a bit slower than VS.NET, but not 3 minutes to compile
> (more like a few extra seconds).
> --
> Gregory A. Beamer
> MVP; MCP: +I, SE, SD, DBA
> ****************************************
*******
> Think Outside the Box!
> ****************************************
*******
> "Amelyan" <bamelyan at wi.rr.com> wrote in message
> news:eHx9wrV4FHA.268@.TK2MSFTNGP10.phx.gbl...
>
Juan,
After further analysis, I noticed that when I click Build button, VS2005 is
doing something before it actually starts compiling and during this time I
see only 0-2% of cpu utilization, 95% of that 2 minute time VS2005 is in
that mode. At that time, VS2005 doesn't respond to any commands or menu
clicks.
When it actually start building (starting with 'Validating Web Site' message
in output window), it takes normal time, few seconds to build. And during
that actual build time, VS2005 responds to commands and menu clicks in a
normal way.
So, 95% of the time is between when I click Build button and when the build
process is actually starts, VS2005 spends in a "locked state" where it
doesn't even respond to commands or menu clicks, utilizing 0-2% of cpu.
Remember, that it only happens when my dll project is modified.
Thanks,
"Juan T. Llibre" <nomailreplies@.nowhere.com> wrote in message
news:Omql1YW4FHA.2816@.tk2msftngp13.phx.gbl...
>I must have misunderstood what you meant when
> you stated "when external DLL is modified".
> I thought "external DLL" referred to a DLL outside your
> project since, otherwise, it would be a "project DLL".
> So, to recap,
> 1. you have a web solution
> 2. you add the DLL solution to that solution
> 3. you compile the DLL and the web solution sequentially,
> from within the *same* solution
> or, do you
> 1. have a web solution
> 2. have a *different* solution for your DLL
> ( not included in your web solution)
> 3. You recompile the DLL
> 4. you recompile the web solution and that causes the problem you describe
> ?
>
> Juan T. Llibre, ASP.NET MVP
> ASP.NET FAQ : http://asp.net.do/faq/
> Foros de ASP.NET en Espaol : http://asp.net.do/foros/
> ======================================
> "Amelyan" <bamelyan at wi.rr.com> wrote in message
> news:eIrxPLW4FHA.2600@.tk2msftngp13.phx.gbl...
>

Takes VS 2005 *3 MINUTES* to compile ASP.NET 2.0 website

It takes VS 2005 1, 2, and somtimes 3 MINUTES to compile ASP.NET 2.0 website
when external DLL is modified. As a matter of fact, when I click 'Build',
it looks like VS 2005 hangs for most of that time before it actually starts
compiling. If I modify something inside WebSite project itself without
modifying DLL, it takes few seconds to compile.

Why? How can I control this behavior?

I was able to reproduce this behavior by creating a simple WebSite and
simple DLL that I reference from that WebSite project.Amelyan,

you have posted this message 3 times now, and you accepted
that the explanation which was offered made sense.

But you have not said whether you tried the simple solution posted,
and whether it works or not.

Did you try it ? Does it work ?

Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
Foros de ASP.NET en Espaol : http://asp.net.do/foros/
======================================
"Amelyan" <bamelyan at wi.rr.com> wrote in message
news:eHx9wrV4FHA.268@.TK2MSFTNGP10.phx.gbl...
> It takes VS 2005 1, 2, and somtimes 3 MINUTES to compile ASP.NET 2.0 website when
> external DLL is modified. As a matter of fact, when I click 'Build', it looks like VS
> 2005 hangs for most of that time before it actually starts compiling. If I modify
> something inside WebSite project itself without modifying DLL, it takes few seconds to
> compile.
> Why? How can I control this behavior?
> I was able to reproduce this behavior by creating a simple WebSite and simple DLL that I
> reference from that WebSite project.
Juan,

Yes, I tried the your suggestion. When I remove the old DLL and re-add it
to references every time compile, this process takes even longer. So, this
solution is useless.

"Juan T. Llibre" <nomailreplies@.nowhere.com> wrote in message
news:%23g1x5yV4FHA.2364@.TK2MSFTNGP12.phx.gbl...
> Amelyan,
> you have posted this message 3 times now, and you accepted
> that the explanation which was offered made sense.
> But you have not said whether you tried the simple solution posted,
> and whether it works or not.
> Did you try it ? Does it work ?
>
>
> Juan T. Llibre, ASP.NET MVP
> ASP.NET FAQ : http://asp.net.do/faq/
> Foros de ASP.NET en Espaol : http://asp.net.do/foros/
> ======================================
> "Amelyan" <bamelyan at wi.rr.com> wrote in message
> news:eHx9wrV4FHA.268@.TK2MSFTNGP10.phx.gbl...
>> It takes VS 2005 1, 2, and somtimes 3 MINUTES to compile ASP.NET 2.0
>> website when external DLL is modified. As a matter of fact, when I click
>> 'Build', it looks like VS 2005 hangs for most of that time before it
>> actually starts compiling. If I modify something inside WebSite project
>> itself without modifying DLL, it takes few seconds to compile.
>>
>> Why? How can I control this behavior?
>>
>> I was able to reproduce this behavior by creating a simple WebSite and
>> simple DLL that I reference from that WebSite project.
>>
Have you tried compiling the assembly from within VS ?

Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
Foros de ASP.NET en Espaol : http://asp.net.do/foros/
======================================
"Amelyan" <bamelyan at wi.rr.com> wrote in message
news:eVrkx2V4FHA.4076@.TK2MSFTNGP15.phx.gbl...
> Juan,
> Yes, I tried the your suggestion. When I remove the old DLL and re-add it to references
> every time compile, this process takes even longer. So, this solution is useless.
>
> "Juan T. Llibre" <nomailreplies@.nowhere.com> wrote in message
> news:%23g1x5yV4FHA.2364@.TK2MSFTNGP12.phx.gbl...
>> Amelyan,
>>
>> you have posted this message 3 times now, and you accepted
>> that the explanation which was offered made sense.
>>
>> But you have not said whether you tried the simple solution posted,
>> and whether it works or not.
>>
>> Did you try it ? Does it work ?
>>
>>
>>
>>
>> Juan T. Llibre, ASP.NET MVP
>> ASP.NET FAQ : http://asp.net.do/faq/
>> Foros de ASP.NET en Espaol : http://asp.net.do/foros/
>> ======================================
>> "Amelyan" <bamelyan at wi.rr.com> wrote in message
>> news:eHx9wrV4FHA.268@.TK2MSFTNGP10.phx.gbl...
>>> It takes VS 2005 1, 2, and somtimes 3 MINUTES to compile ASP.NET 2.0 website when
>>> external DLL is modified. As a matter of fact, when I click 'Build', it looks like VS
>>> 2005 hangs for most of that time before it actually starts compiling. If I modify
>>> something inside WebSite project itself without modifying DLL, it takes few seconds to
>>> compile.
>>>
>>> Why? How can I control this behavior?
>>>
>>> I was able to reproduce this behavior by creating a simple WebSite and simple DLL that
>>> I reference from that WebSite project.
>>>
>>
>>
Yes, that is how I am doing it.

"Juan T. Llibre" <nomailreplies@.nowhere.com> wrote in message
news:uKxQT5V4FHA.2872@.TK2MSFTNGP15.phx.gbl...
> Have you tried compiling the assembly from within VS ?
>
> Juan T. Llibre, ASP.NET MVP
> ASP.NET FAQ : http://asp.net.do/faq/
> Foros de ASP.NET en Espaol : http://asp.net.do/foros/
> ======================================
> "Amelyan" <bamelyan at wi.rr.com> wrote in message
> news:eVrkx2V4FHA.4076@.TK2MSFTNGP15.phx.gbl...
>> Juan,
>>
>> Yes, I tried the your suggestion. When I remove the old DLL and re-add
>> it to references every time compile, this process takes even longer. So,
>> this solution is useless.
>>
>>
>>
>> "Juan T. Llibre" <nomailreplies@.nowhere.com> wrote in message
>> news:%23g1x5yV4FHA.2364@.TK2MSFTNGP12.phx.gbl...
>>> Amelyan,
>>>
>>> you have posted this message 3 times now, and you accepted
>>> that the explanation which was offered made sense.
>>>
>>> But you have not said whether you tried the simple solution posted,
>>> and whether it works or not.
>>>
>>> Did you try it ? Does it work ?
>>>
>>>
>>>
>>>
>>> Juan T. Llibre, ASP.NET MVP
>>> ASP.NET FAQ : http://asp.net.do/faq/
>>> Foros de ASP.NET en Espaol : http://asp.net.do/foros/
>>> ======================================
>>> "Amelyan" <bamelyan at wi.rr.com> wrote in message
>>> news:eHx9wrV4FHA.268@.TK2MSFTNGP10.phx.gbl...
>>>> It takes VS 2005 1, 2, and somtimes 3 MINUTES to compile ASP.NET 2.0
>>>> website when external DLL is modified. As a matter of fact, when I
>>>> click 'Build', it looks like VS 2005 hangs for most of that time before
>>>> it actually starts compiling. If I modify something inside WebSite
>>>> project itself without modifying DLL, it takes few seconds to compile.
>>>>
>>>> Why? How can I control this behavior?
>>>>
>>>> I was able to reproduce this behavior by creating a simple WebSite and
>>>> simple DLL that I reference from that WebSite project.
>>>>
>>>
>>>
>>
>>
I must have misunderstood what you meant when
you stated "when external DLL is modified".

I thought "external DLL" referred to a DLL outside your
project since, otherwise, it would be a "project DLL".

So, to recap,

1. you have a web solution
2. you add the DLL solution to that solution
3. you compile the DLL and the web solution sequentially,
from within the *same* solution

or, do you

1. have a web solution
2. have a *different* solution for your DLL
( not included in your web solution)
3. You recompile the DLL
4. you recompile the web solution and that causes the problem you describe

?

Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
Foros de ASP.NET en Espaol : http://asp.net.do/foros/
======================================
"Amelyan" <bamelyan at wi.rr.com> wrote in message
news:eIrxPLW4FHA.2600@.tk2msftngp13.phx.gbl...
> Yes, that is how I am doing it.
> "Juan T. Llibre" <nomailreplies@.nowhere.com> wrote in message
> news:uKxQT5V4FHA.2872@.TK2MSFTNGP15.phx.gbl...
>> Have you tried compiling the assembly from within VS ?
>>
>>
>>
>> Juan T. Llibre, ASP.NET MVP
>> ASP.NET FAQ : http://asp.net.do/faq/
>> Foros de ASP.NET en Espaol : http://asp.net.do/foros/
>> ======================================
>> "Amelyan" <bamelyan at wi.rr.com> wrote in message
>> news:eVrkx2V4FHA.4076@.TK2MSFTNGP15.phx.gbl...
>>> Juan,
>>>
>>> Yes, I tried the your suggestion. When I remove the old DLL and re-add it to
>>> references every time compile, this process takes even longer. So, this solution is
>>> useless.
>>>
>>>
>>>
>>> "Juan T. Llibre" <nomailreplies@.nowhere.com> wrote in message
>>> news:%23g1x5yV4FHA.2364@.TK2MSFTNGP12.phx.gbl...
>>>> Amelyan,
>>>>
>>>> you have posted this message 3 times now, and you accepted
>>>> that the explanation which was offered made sense.
>>>>
>>>> But you have not said whether you tried the simple solution posted,
>>>> and whether it works or not.
>>>>
>>>> Did you try it ? Does it work ?
>>>>
>>>>
>>>>
>>>>
>>>> Juan T. Llibre, ASP.NET MVP
>>>> ASP.NET FAQ : http://asp.net.do/faq/
>>>> Foros de ASP.NET en Espaol : http://asp.net.do/foros/
>>>> ======================================
>>>> "Amelyan" <bamelyan at wi.rr.com> wrote in message
>>>> news:eHx9wrV4FHA.268@.TK2MSFTNGP10.phx.gbl...
>>>>> It takes VS 2005 1, 2, and somtimes 3 MINUTES to compile ASP.NET 2.0 website when
>>>>> external DLL is modified. As a matter of fact, when I click 'Build', it looks like
>>>>> VS 2005 hangs for most of that time before it actually starts compiling. If I
>>>>> modify something inside WebSite project itself without modifying DLL, it takes few
>>>>> seconds to compile.
>>>>>
>>>>> Why? How can I control this behavior?
>>>>>
>>>>> I was able to reproduce this behavior by creating a simple WebSite and simple DLL
>>>>> that I reference from that WebSite project.
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
I just tried both suggestions. I am still experiencing delays in compiling
event if I include my DLL project inside my WEbSite solution and add it as
project reference.

"Juan T. Llibre" <nomailreplies@.nowhere.com> wrote in message
news:Omql1YW4FHA.2816@.tk2msftngp13.phx.gbl...
>I must have misunderstood what you meant when
> you stated "when external DLL is modified".
> I thought "external DLL" referred to a DLL outside your
> project since, otherwise, it would be a "project DLL".
> So, to recap,
> 1. you have a web solution
> 2. you add the DLL solution to that solution
> 3. you compile the DLL and the web solution sequentially,
> from within the *same* solution
> or, do you
> 1. have a web solution
> 2. have a *different* solution for your DLL
> ( not included in your web solution)
> 3. You recompile the DLL
> 4. you recompile the web solution and that causes the problem you describe
> ?
>
> Juan T. Llibre, ASP.NET MVP
> ASP.NET FAQ : http://asp.net.do/faq/
> Foros de ASP.NET en Espaol : http://asp.net.do/foros/
> ======================================
> "Amelyan" <bamelyan at wi.rr.com> wrote in message
> news:eIrxPLW4FHA.2600@.tk2msftngp13.phx.gbl...
>> Yes, that is how I am doing it.
>>
>> "Juan T. Llibre" <nomailreplies@.nowhere.com> wrote in message
>> news:uKxQT5V4FHA.2872@.TK2MSFTNGP15.phx.gbl...
>>> Have you tried compiling the assembly from within VS ?
>>>
>>>
>>>
>>> Juan T. Llibre, ASP.NET MVP
>>> ASP.NET FAQ : http://asp.net.do/faq/
>>> Foros de ASP.NET en Espaol : http://asp.net.do/foros/
>>> ======================================
>>> "Amelyan" <bamelyan at wi.rr.com> wrote in message
>>> news:eVrkx2V4FHA.4076@.TK2MSFTNGP15.phx.gbl...
>>>> Juan,
>>>>
>>>> Yes, I tried the your suggestion. When I remove the old DLL and re-add
>>>> it to references every time compile, this process takes even longer.
>>>> So, this solution is useless.
>>>>
>>>>
>>>>
>>>> "Juan T. Llibre" <nomailreplies@.nowhere.com> wrote in message
>>>> news:%23g1x5yV4FHA.2364@.TK2MSFTNGP12.phx.gbl...
>>>>> Amelyan,
>>>>>
>>>>> you have posted this message 3 times now, and you accepted
>>>>> that the explanation which was offered made sense.
>>>>>
>>>>> But you have not said whether you tried the simple solution posted,
>>>>> and whether it works or not.
>>>>>
>>>>> Did you try it ? Does it work ?
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> Juan T. Llibre, ASP.NET MVP
>>>>> ASP.NET FAQ : http://asp.net.do/faq/
>>>>> Foros de ASP.NET en Espaol : http://asp.net.do/foros/
>>>>> ======================================
>>>>> "Amelyan" <bamelyan at wi.rr.com> wrote in message
>>>>> news:eHx9wrV4FHA.268@.TK2MSFTNGP10.phx.gbl...
>>>>>> It takes VS 2005 1, 2, and somtimes 3 MINUTES to compile ASP.NET 2.0
>>>>>> website when external DLL is modified. As a matter of fact, when I
>>>>>> click 'Build', it looks like VS 2005 hangs for most of that time
>>>>>> before it actually starts compiling. If I modify something inside
>>>>>> WebSite project itself without modifying DLL, it takes few seconds to
>>>>>> compile.
>>>>>>
>>>>>> Why? How can I control this behavior?
>>>>>>
>>>>>> I was able to reproduce this behavior by creating a simple WebSite
>>>>>> and simple DLL that I reference from that WebSite project.
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
Amount of memory on you box? What kind of processor?

Have you checked CPU usage, disk swapping and memory usage during a compile?

What is this "simple" DLL doing?

Did you have a beta previously installed?

If so, are you sure you uninstalled everything completely (some betas
required manual steps to remove)?

There are a lot of variables in the mix, so it is hard to find a solution.
For me, the IDE is a bit slower than VS.NET, but not 3 minutes to compile
(more like a few extra seconds).

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***********************************************
Think Outside the Box!
***********************************************
"Amelyan" <bamelyan at wi.rr.com> wrote in message
news:eHx9wrV4FHA.268@.TK2MSFTNGP10.phx.gbl...
> It takes VS 2005 1, 2, and somtimes 3 MINUTES to compile ASP.NET 2.0
> website when external DLL is modified. As a matter of fact, when I click
> 'Build', it looks like VS 2005 hangs for most of that time before it
> actually starts compiling. If I modify something inside WebSite project
> itself without modifying DLL, it takes few seconds to compile.
> Why? How can I control this behavior?
> I was able to reproduce this behavior by creating a simple WebSite and
> simple DLL that I reference from that WebSite project.
I have 2GHz processor with 512MB of memory. I never installed beta, I
installed VS2005 final release.

Simple HelloWorld.dll doesn't do much, contains a function that returns a
string.

It does take few extra seconds when I modify my WebSite project internally,
but when I modify external Helloworld.dll, that is what slows down
compilation.

I pulled up OutputWindow in VS2005 to watch the progress of compilation. I
noticed that 95% of that 2-3 minutes time is VS2005 is blocked (not
responding) sitting there with CPU utilization at 2%. Then when it actually
starts compiling, it compiles in normal time.

I guess, from my further observations, when I click the Build button, 95% of
the time VS2005 is doing something before it actually starts compiling
(maybe waiting for some resorse, and at that time not responding to any user
commands or menu clicks). When it actually starts compiling, it takes a few
seconds.

"Cowboy (Gregory A. Beamer)" <NoSpamMgbworld@.comcast.netNoSpamM> wrote in
message news:uotJK$X4FHA.4076@.TK2MSFTNGP15.phx.gbl...
> Amount of memory on you box? What kind of processor?
> Have you checked CPU usage, disk swapping and memory usage during a
> compile?
> What is this "simple" DLL doing?
> Did you have a beta previously installed?
> If so, are you sure you uninstalled everything completely (some betas
> required manual steps to remove)?
> There are a lot of variables in the mix, so it is hard to find a solution.
> For me, the IDE is a bit slower than VS.NET, but not 3 minutes to compile
> (more like a few extra seconds).
> --
> Gregory A. Beamer
> MVP; MCP: +I, SE, SD, DBA
> ***********************************************
> Think Outside the Box!
> ***********************************************
> "Amelyan" <bamelyan at wi.rr.com> wrote in message
> news:eHx9wrV4FHA.268@.TK2MSFTNGP10.phx.gbl...
>> It takes VS 2005 1, 2, and somtimes 3 MINUTES to compile ASP.NET 2.0
>> website when external DLL is modified. As a matter of fact, when I click
>> 'Build', it looks like VS 2005 hangs for most of that time before it
>> actually starts compiling. If I modify something inside WebSite project
>> itself without modifying DLL, it takes few seconds to compile.
>>
>> Why? How can I control this behavior?
>>
>> I was able to reproduce this behavior by creating a simple WebSite and
>> simple DLL that I reference from that WebSite project.
>>
Juan,

After further analysis, I noticed that when I click Build button, VS2005 is
doing something before it actually starts compiling and during this time I
see only 0-2% of cpu utilization, 95% of that 2 minute time VS2005 is in
that mode. At that time, VS2005 doesn't respond to any commands or menu
clicks.

When it actually start building (starting with 'Validating Web Site' message
in output window), it takes normal time, few seconds to build. And during
that actual build time, VS2005 responds to commands and menu clicks in a
normal way.

So, 95% of the time is between when I click Build button and when the build
process is actually starts, VS2005 spends in a "locked state" where it
doesn't even respond to commands or menu clicks, utilizing 0-2% of cpu.

Remember, that it only happens when my dll project is modified.

Thanks,

"Juan T. Llibre" <nomailreplies@.nowhere.com> wrote in message
news:Omql1YW4FHA.2816@.tk2msftngp13.phx.gbl...
>I must have misunderstood what you meant when
> you stated "when external DLL is modified".
> I thought "external DLL" referred to a DLL outside your
> project since, otherwise, it would be a "project DLL".
> So, to recap,
> 1. you have a web solution
> 2. you add the DLL solution to that solution
> 3. you compile the DLL and the web solution sequentially,
> from within the *same* solution
> or, do you
> 1. have a web solution
> 2. have a *different* solution for your DLL
> ( not included in your web solution)
> 3. You recompile the DLL
> 4. you recompile the web solution and that causes the problem you describe
> ?
>
> Juan T. Llibre, ASP.NET MVP
> ASP.NET FAQ : http://asp.net.do/faq/
> Foros de ASP.NET en Espaol : http://asp.net.do/foros/
> ======================================
> "Amelyan" <bamelyan at wi.rr.com> wrote in message
> news:eIrxPLW4FHA.2600@.tk2msftngp13.phx.gbl...
>> Yes, that is how I am doing it.
>>
>> "Juan T. Llibre" <nomailreplies@.nowhere.com> wrote in message
>> news:uKxQT5V4FHA.2872@.TK2MSFTNGP15.phx.gbl...
>>> Have you tried compiling the assembly from within VS ?
>>>
>>>
>>>
>>> Juan T. Llibre, ASP.NET MVP
>>> ASP.NET FAQ : http://asp.net.do/faq/
>>> Foros de ASP.NET en Espaol : http://asp.net.do/foros/
>>> ======================================
>>> "Amelyan" <bamelyan at wi.rr.com> wrote in message
>>> news:eVrkx2V4FHA.4076@.TK2MSFTNGP15.phx.gbl...
>>>> Juan,
>>>>
>>>> Yes, I tried the your suggestion. When I remove the old DLL and re-add
>>>> it to references every time compile, this process takes even longer.
>>>> So, this solution is useless.
>>>>
>>>>
>>>>
>>>> "Juan T. Llibre" <nomailreplies@.nowhere.com> wrote in message
>>>> news:%23g1x5yV4FHA.2364@.TK2MSFTNGP12.phx.gbl...
>>>>> Amelyan,
>>>>>
>>>>> you have posted this message 3 times now, and you accepted
>>>>> that the explanation which was offered made sense.
>>>>>
>>>>> But you have not said whether you tried the simple solution posted,
>>>>> and whether it works or not.
>>>>>
>>>>> Did you try it ? Does it work ?
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> Juan T. Llibre, ASP.NET MVP
>>>>> ASP.NET FAQ : http://asp.net.do/faq/
>>>>> Foros de ASP.NET en Espaol : http://asp.net.do/foros/
>>>>> ======================================
>>>>> "Amelyan" <bamelyan at wi.rr.com> wrote in message
>>>>> news:eHx9wrV4FHA.268@.TK2MSFTNGP10.phx.gbl...
>>>>>> It takes VS 2005 1, 2, and somtimes 3 MINUTES to compile ASP.NET 2.0
>>>>>> website when external DLL is modified. As a matter of fact, when I
>>>>>> click 'Build', it looks like VS 2005 hangs for most of that time
>>>>>> before it actually starts compiling. If I modify something inside
>>>>>> WebSite project itself without modifying DLL, it takes few seconds to
>>>>>> compile.
>>>>>>
>>>>>> Why? How can I control this behavior?
>>>>>>
>>>>>> I was able to reproduce this behavior by creating a simple WebSite
>>>>>> and simple DLL that I reference from that WebSite project.
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
It sounds like maybe something in your solution is referencing a network
resource that is not available.

"Amelyan" <bamelyan@.wi.rr.com> wrote in message
news:uO7Ha5i4FHA.2552@.TK2MSFTNGP10.phx.gbl...
> I have 2GHz processor with 512MB of memory. I never installed beta, I
> installed VS2005 final release.
> Simple HelloWorld.dll doesn't do much, contains a function that returns a
> string.
> It does take few extra seconds when I modify my WebSite project
internally,
> but when I modify external Helloworld.dll, that is what slows down
> compilation.
> I pulled up OutputWindow in VS2005 to watch the progress of compilation.
I
> noticed that 95% of that 2-3 minutes time is VS2005 is blocked (not
> responding) sitting there with CPU utilization at 2%. Then when it
actually
> starts compiling, it compiles in normal time.
> I guess, from my further observations, when I click the Build button, 95%
of
> the time VS2005 is doing something before it actually starts compiling
> (maybe waiting for some resorse, and at that time not responding to any
user
> commands or menu clicks). When it actually starts compiling, it takes a
few
> seconds.
>
> "Cowboy (Gregory A. Beamer)" <NoSpamMgbworld@.comcast.netNoSpamM> wrote in
> message news:uotJK$X4FHA.4076@.TK2MSFTNGP15.phx.gbl...
> > Amount of memory on you box? What kind of processor?
> > Have you checked CPU usage, disk swapping and memory usage during a
> > compile?
> > What is this "simple" DLL doing?
> > Did you have a beta previously installed?
> > If so, are you sure you uninstalled everything completely (some betas
> > required manual steps to remove)?
> > There are a lot of variables in the mix, so it is hard to find a
solution.
> > For me, the IDE is a bit slower than VS.NET, but not 3 minutes to
compile
> > (more like a few extra seconds).
> > --
> > Gregory A. Beamer
> > MVP; MCP: +I, SE, SD, DBA
> > ***********************************************
> > Think Outside the Box!
> > ***********************************************
> > "Amelyan" <bamelyan at wi.rr.com> wrote in message
> > news:eHx9wrV4FHA.268@.TK2MSFTNGP10.phx.gbl...
> >> It takes VS 2005 1, 2, and somtimes 3 MINUTES to compile ASP.NET 2.0
> >> website when external DLL is modified. As a matter of fact, when I
click
> >> 'Build', it looks like VS 2005 hangs for most of that time before it
> >> actually starts compiling. If I modify something inside WebSite
project
> >> itself without modifying DLL, it takes few seconds to compile.
> >>
> >> Why? How can I control this behavior?
> >>
> >> I was able to reproduce this behavior by creating a simple WebSite and
> >> simple DLL that I reference from that WebSite project.
> >>

taking a build of asp.net 2005 application.

hai

please help me. when i am trying to get a build i got this problem. here i am giving that error. please if any one can resolve it respond to this.

Compilation Error

Description:An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message:CS0030: Cannot convert type 'ASP.login_aspx' to 'System.Web.UI.WebControls.Login'

Source Error:

Line 120: public login_aspx() {Line 121: string[] dependencies;Line 122: ((Login)(this)).AppRelativeVirtualPath = "~/Login.aspx";Line 123: if ((global::ASP.login_aspx.@dotnet.itags.org.__initialized == false)) {Line 124: global::ASP.login_aspx.@dotnet.itags.org.__stringResource = this.ReadStringResource();


Source File: c:\WINNT\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\its\6b99b5ef\95ca6e32\App_Web_login.aspx.cdcab7d2.b6tyqpzy.0.cs Line: 122

Hi and Welcome to ASP.NET Forum!

this in your context refers to System.Web.UI.Page and you are trying to cast it to Login (which of type System.Web.UI.WebControls.Login) which cannot be done. What you are trying to do? Are you trying to get a reference to the page?

Thanks

Tuesday, March 13, 2012

Tampering, Stealing cookies protection in ASP.NET 2.0

Hello,

I need to know how to protect cookies from tampering or stealing.

I want to ensure the cookie is binded to a particular client only. Only the
requested client should have access to the cookie.

if the cookies is stolen & used on another machine for the same website, it
should not allow the cookie to be read

Any thoughts are welcome.Use SSL to prevent stealing.

Encrypt the data in the cookie to prevent viewing.

MAC protect to prevent tampering.

Put an expiration date in the data in the cookie and check for expiration
in your code to ensure valid timeout.

-Brock
http://staff.develop.com/ballen

Quote:

Originally Posted by

Hello,
>
I need to know how to protect cookies from tampering or stealing.
>
I want to ensure the cookie is binded to a particular client only.
Only the requested client should have access to the cookie.
>
if the cookies is stolen & used on another machine for the same
website, it should not allow the cookie to be read
>
Any thoughts are welcome.
>