Popup in Listview - asp.net

I have a Listview which consist of field called description(Which can be lengthy)
now i want to set read more and when user click on read more it should give full description in popup.
Code Designing :
<asp:ListView ID="listcourse" runat="server" >
<ItemTemplate>
<p >
<div>
<b>
<%# (Eval("Description").ToString().Length <=150)?Eval("Description").ToString(): Eval("Description").ToString().Substring(0, 150) + "...Readmore"%>
</b>
</div>
</p>
</ItemTemplate>
</asp:ListView>
C# Code :
public void bindList()
{
listcourse.DataSource = DB.Tbl_Categories_Master.Where(p => p.Deleted == true && p.Parent_Cat_id == 0);
listcourse.DataBind();
}
How can I ?

Since its MVC application and by default the template uses Bootstrap, I am giving you this solution.
Add this in your <script> tag.
$(function(){
$('div.popOverWrapper b').popover()
});
Also modify your HTMl div tag to have a class called popOverWrapper
<asp:ListView ID="listcourse" runat="server" >
<ItemTemplate>
<p>
<div class="popOverWrapper">
<b>
//....
</b>
</div>
</p>
</ItemTemplate>
</asp:ListView>
So technically what I am doing is to first mark my respective divs with a class name of my choice.. And later when the document is ready I will find this div and find the b tag within it and apply the bootstrap .popover() plugin

You can achieve this using Web service - Try this, It may help you.
---Web service code---
[WebMethod]
public string getFullDescription(int ID) {
string result = "";
using (SqlConnection con = new SqlConnection(#"Data Source=SANTOSH-PC\SQLEXPRESS;Initial Catalog=master;User ID=sa;Password=ssrana#317"))
{
SqlCommand com = new SqlCommand("select description from discriptionList where id="+ID+"", con);
con.Open();
SqlDataReader rdr = com.ExecuteReader();
if (rdr.Read())
{
result = Convert.ToString(rdr["description"]);
}
}
return result;
}
---.Aspx code---
<div>
<asp:ListView ID="lstView" runat="server" DataKeyNames="id" GroupItemCount="4" OnItemDataBound="lstView_ItemDataBound">
<EmptyDataTemplate>
<table>
<tr>
<td></td>
</tr>
</table>
</EmptyDataTemplate>
<GroupTemplate>
<tr id="ItemPlaceHolderContainer" runat="server">
<td id="ItemPlaceHolder" runat="server" style="text-align: center;"></td>
</tr>
</GroupTemplate>
<ItemTemplate>
<td id="Td1" runat="server" style="border: 2px solid #adbdc4; border-collapse: inherit; width: 20%">
<table style="width: 100%;">
<tr>
<td style="text-align: left; font-weight: bold; width: 100%; padding-left: 1px; height: 23px; vertical-align: top; font-size: 12px; color: black;">
<b style="text-decoration:underline">Title : <%#Eval("title") %></b>
<br />
<%#Eval("description") %>
<asp:LinkButton ID="lnkShowDescription" runat="server" Text="Read more.."></asp:LinkButton>
</td>
</tr>
</table>
</td>
</ItemTemplate>
<LayoutTemplate>
<table style="width: 100%; margin-left: 3px; background-color: #f2f2f2">
<tbody>
<tr>
<td>
<table id="GroupPlaceHolder" runat="server" style="width: 100%; height: 90%; text-align: center;">
<tr>
<td></td>
</tr>
</table>
</td>
</tr>
</tbody>
</table>
<tr>
<td></td>
<td colspan="5">
</td>
</tr>
</LayoutTemplate>
</asp:ListView>
</div>
---I am using Script Manager for calling webservice in my project---
<asp:ScriptManager ID="scripMngr" runat="server" >
<Services>
<asp:ServiceReference Path="~/MyServices.asmx" />
</Services>
</asp:ScriptManager>
----- This is the popup div ------
<div class="PopBackground" id="dvBackground" >
<div id="NewPopUp">
</div>
<br />
<div style="height:30px; text-align:right;">
<asp:Button ID="btnClose" runat="server" Text="Close" OnClientClick=" return hidePopup();" Style="background-color: #fb7b3a; border: 1px solid #fb7b3a" />
</div>
</div>
--- This is .cs code----
protected void Page_Load(object sender, EventArgs e)
{
bindView();
}
protected void bindView()
{
using (SqlDataAdapter da = new SqlDataAdapter("select id,title,SUBSTRING(description,1,40) as description from discriptionList", new SqlConnection(#"Data Source=SANTOSH-PC\SQLEXPRESS;Initial Catalog=master;User ID=sa;Password=ssrana#317")))
{
DataSet ds = new DataSet();
da.Fill(ds);
lstView.DataSource = ds;
lstView.DataBind();
}
}
protected void lstView_ItemDataBound(object sender, ListViewItemEventArgs e)
{
if (e.Item.ItemType == ListViewItemType.DataItem)
{
LinkButton lnkShowDescription = (LinkButton)(e.Item.FindControl("lnkShowDescription"));
int id=Convert.ToInt32(lstView.DataKeys[e.Item.DisplayIndex].Value);
lnkShowDescription.OnClientClick="return getFullDescription('"+id+"')";
}
}
--- This is popup style---
#NewPopUp {
position: fixed;
width: 300px;
height:auto;
max-height:650px;
top: 20%;
left: 50%;
margin-left: -255px;
margin-top: -150px;
border: 2px solid #adbdc4;
background-color: white;
text-align: left;
padding: 10px;
Z-index: 1000;
font-family: Verdana;
font-size: 10pt;
border-radius: 7px;
-webkit-border-radius: 10px;
-moz-border-radius: 10px;
color: black;
filter: alpha(opacity=100);
opacity: 1;
-moz-opacity: 1;
display:none;
}
.PopBackground {
position: fixed;
vertical-align: middle;
text-align: center;
z-index: 999;
top: 0px;
left: 0px;
background-color: gray;
filter: alpha(opacity=70);
opacity: 0.95;
margin: 0px 0px 0px 0px;
width: 100%;
height: 100%;
min-height: 100%;
min-width: 100%;
display:none;
}
</style>
----- This is Script ------
<script type="text/javascript">
function getFullDescription(Id) {
MyServices.getFullDescription(Id, onSuccess, onError);
return false;
}
function onSuccess(result) {
document.getElementById('NewPopUp').style.display = 'block';
document.getElementById('dvBackground').style.display = 'block';
document.getElementById('NewPopUp').innerHTML = "Description : "+result;
}
function onError(error) {
document.getElementById('NewPopUp').style.display = 'block';
document.getElementById('dvBackground').style.display = 'block';
document.getElementById('NewPopUp').innerHTML = "Error : " + error;
}
function hidePopup() {
document.getElementById('NewPopUp').style.display = 'none';
document.getElementById('dvBackground').style.display = 'none';
return false;
}
</script>

Related

How to add Show/Hide Password button in Listview ASP.NET?

<EditItemTemplate >
<li style="">username:
<asp:Label ID="usernameLabel1" runat="server" Text='<%# Eval("username") %>' />
<br />
password:
<asp:TextBox ID="passwordTextBox" runat="server" Text='<%# Bind("password") %>' />
<asp:Button ID="btnClick" OnClick="btnClick_Click" runat="server" Text="Hide/Show" />
<br />
email:
<asp:TextBox ID="emailTextBox" runat="server" Text='<%# Bind("email") %>' />
<br />
phone:
<asp:TextBox ID="phoneTextBox" runat="server" Text='<%# Bind("phone") %>' />
<br />
dob:
<asp:TextBox ID="dobTextBox" runat="server" Text='<%# Bind("dob") %>' />
<br />
gender:
<asp:TextBox ID="genderTextBox" runat="server" Text='<%# Bind("gender") %>' />
<br />
<asp:Button ID="UpdateButton" runat="server" CommandName="Update" Text="Update" />
<asp:Button ID="CancelButton" runat="server" CommandName="Cancel" Text="Cancel" />
</li>
</EditItemTemplate>
For example, in Listview edit item template I want to add that button so how to access that button in code behind file as it is in Listview.
For displaying the Password, try the following Client-Side approach:
.wrapper {
display: inline-block;
position: relative;
}
.reveal-eye {
position: relative;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
position: absolute;
right: 1px;
top: 1px;
bottom: 1px;
z-index: 2;
width: 30px;
background: #fff url(https://dtzbdy9anri2p.cloudfront.net/cache/b55f544d09a0872a74b4427ce1fe18dd78418396/telerik/img/dist/reveal-password.png) 50% 50% no-repeat;
cursor: pointer;
visibility: hidden;
opacity: 0;
transition: opacity .2s ease 0s, visibility 0s linear .2s;
}
.reveal-eye.is-visible {
display: block;
visibility: visible;
opacity: 1;
transition: opacity .2s ease 0s, visibility 0s linear 0s;
}
<div class="wrapper">
<!--<asp:TextBox ID="passwordTextBox" runat="server" TextMode="Password" />-->
<input type="password" id="passwordTextBox" />
</div>
<script src="https://code.jquery.com/jquery-3.4.1.min.js"></script>
<script>
function checkShowPasswordVisibility() {
var $revealEye = $(this).parent().find(".reveal-eye");
if (this.value) {
$revealEye.addClass("is-visible");
} else {
$revealEye.removeClass("is-visible");
}
}
$(document).ready(function () {
var txtPassword = document.getElementById('passwordTextBox');
var $revealEye = $('<span class="reveal-eye"></span>')
$(txtPassword).parent().append($revealEye);
$(txtPassword).on("keyup", checkShowPasswordVisibility)
$revealEye.on({
mousedown: function () { txtPassword.setAttribute("type", "text") },
mouseup: function () { txtPassword.setAttribute("type", "password") },
mouseout: function () { txtPassword.setAttribute("type", "password") }
});
})
</script>
Example originates from: ShowPassword button for RadTextBox with TextMode Password
However, if you would like to do it on server-side during a PostBack, here is an example showing how to access the TextBox when the Button Show/Hide is clicked:
protected void btnClick_Click(object sender, EventArgs e)
{
Button btn = sender as Button;
TextBox TextBox1 = btn.Parent.FindControl("TextBox1") as TextBox;
TextBox1.TextMode = TextBox1.TextMode == TextBoxMode.Password ? TextBoxMode.SingleLine : TextBoxMode.Password;
}
You are developing a website, for any user interface interaction, you are strongly recommended to use javascript,css to manipulate it. Only use code behind to process data.
function toggleShowPassword() {
var passwordTextBox = document.getElementById('passwordTextBox');
if(passwordTextBox.getAttribute('type')=='text'){
passwordTextBox.type='password';
}
else {
passwordTextBox.type='text';
}
}
.button {
line-height: 100%;
display: inline-block;
padding: 7px 15px;
background: #6eddff;
text-decoration: none;
color: black;
border-radius: 6px;
}
.button:active,
.button:hover{
background: #3d9dba;
color: white;
}
<input id='passwordTextBox' type='password' value='abcd' />
<a class='button' href='#' onclick='toggleShowPassword(); return false;'>
Show/Hide Password</a>

CSS print - stretch table for the entire page (height = 100%)

Basically, what I am trying to is to spread a table to fill the rest of the page in print mode. I've surfed the internet, examined this post, and yet after two hours can't figure out what I am doing wrong. The idea is that the table should take up the rest of the page
document.querySelector("#print").addEventListener("click", function() {
//var html = "<div>Test assignment</div>";
//$('.test').html(html);
window.print();
});
#media print {
body * {
visibility: hidden;
}
#print-wrapper * {
visibility: visible;
}
.my-table {
width: 100%;
height: 100%;
border: solid;
table-layout: fixed;
}
}
<input type="button" value="print" id="print">
<div id="print-wrapper">
<div class="print-heading">My table
</div>
<div>
<div class="print-week-heading">Some heading</div>
<table class="my-table">
<tr>
<td>
A
</td>
<td>
B
</td>
</tr>
<tr>
<td>
C
</td>
<td>
D
</td>
</tr>
</table>
</div>
</div>
You can use vh units to adjust the table's height.
#media print {
.my-table {
height: 90vh;
}
}
90vh equates to 90% of the height of the page, so adjust this as necessary.
Added code snippet:
document.querySelector("#print").addEventListener("click", function() {
//var html = "<div>Test assignment</div>";
//$('.test').html(html);
window.print();
});
#media print {
body * {
visibility: hidden;
}
#print-wrapper * {
visibility: visible;
}
.my-table {
width: 100%;
height: 90vh;
border: solid;
table-layout: fixed;
}
}
<input type="button" value="print" id="print">
<div id="print-wrapper">
<div class="print-heading">My table
</div>
<div>
<div class="print-week-heading">Some heading</div>
<table class="my-table">
<tr>
<td>
A
</td>
<td>
B
</td>
</tr>
<tr>
<td>
C
</td>
<td>
D
</td>
</tr>
</table>
</div>
</div>
Sadly, the only approach is to use position: absolute on the table. As long as every parent element has height: 100% then the table will be able to stretch to the full page height.
However, using position: absolute means it is now OVER the rest of the content. I have tried every combination of page-break-* on the table and sibling elements but cannot get the table on its own page at full height.
document.querySelector("#print").addEventListener("click", function() {
//var html = "<div>Test assignment</div>";
//$('.test').html(html);
window.print();
});
#media print {
body,
html,
#print-wrappe {
height: 100%;
}
body * {
visibility: hidden;
}
#print-wrapper * {
visibility: visible;
height: 100%;
}
.my-table {
border: solid;
width: 100%;
top: 0;
bottom: 0;
left: 0;
right: 0;
position: absolute;
}
}
<input type="button" value="print" id="print">
<div id="print-wrapper">
<div class="print-heading">My table
</div>
<div>
<div class="print-week-heading">Some heading</div>
<table class="my-table">
<tr>
<td>
A
</td>
<td>
B
</td>
</tr>
<tr>
<td>
C
</td>
<td>
D
</td>
</tr>
</table>
</div>
</div>
A possible solution to the table being over the content, is to replace print-weekly-heading with a <caption>Some Heading</caption> as the first child of the table? This snippet shows what I'm trying to achieve, but would require further CSS to make the caption a usable title.
document.querySelector("#print").addEventListener("click", function() {
//var html = "<div>Test assignment</div>";
//$('.test').html(html);
window.print();
});
#media print {
body,
html,
#print-wrappe {
height: 100%;
}
body * {
visibility: hidden;
}
#print-wrapper * {
visibility: visible;
height: 100%;
}
.my-table {
border: solid;
width: 100%;
top: 0;
bottom: 0;
left: 0;
right: 0;
position: absolute;
}
}
<input type="button" value="print" id="print">
<div id="print-wrapper">
<div class="print-heading">My table
</div>
<div>
<table class="my-table">
<caption>Some heading</caption>
<tr>
<td>
A
</td>
<td>
B
</td>
</tr>
<tr>
<td>
C
</td>
<td>
D
</td>
</tr>
</table>
</div>
</div>
Edit
A third option, is to display: block the table cells and float them. This requires prior knowledge of the number of tds in the table so you know what width to it as. I've also set the table page-break-before:always on so that the table takes up a whole page to itself. You can remove this and give the table a height of calc(100% - 3em); so that it fits with the headings on the same page as well.
document.querySelector("#print").addEventListener("click", function() {
//var html = "<div>Test assignment</div>";
//$('.test').html(html);
window.print();
});
#media print {
html,
body,
#print-wrapper {
height: 100%;
}
body * {
visibility: hidden;
}
#print-wrapper * {
visibility: visible;
}
#print-wrapper>div:nth-child(2) {
height: 100%;
}
.my-table {
page-break-before: always;
border: solid;
width: 100%;
height: calc(100% - 3em);
}
.my-table td {
display: block;
float: left;
width: 50%;
height: 50%;
padding: 0;
margin: 0;
}
}
<input type="button" value="print" id="print">
<div id="print-wrapper">
<div class="print-heading">My table
</div>
<div>
<div class="print-week-heading">Some heading</div>
<table class="my-table">
<tr>
<td>
A
</td>
<td>
B
</td>
</tr>
<tr>
<td>
C
</td>
<td>
D
</td>
</tr>
</table>
</div>
</div>

ModalPopup div not displaying

I have a ModalPopup window in my asp.net application, that I want to display when a Listview control item is clicked.
<div id="ModalPopup" style="visibility:hidden" runat="server">
<div style="position: absolute; width: 100%; height: 100%; z-index: 10002; background-color: Gray; filter: alpha(opacity=70); opacity: 0.7;">
</div>
<table style="position: absolute; width: 100%; height: 100%; z-index: 10003;">
<tr>
<td align="center" valign="middle">
<div style="color: Black; font-weight: bolder; background-color: White; padding: 15px; width: 200px;">
<asp:Image ID="Image4" runat="server" ImageUrl="~/Images/ajax-loader.gif" />...Processing....
</div>
</td>
</tr>
</table>
</div>
However, in my RadListView1_SelectedIndexChanged event, my code is: ModalPopup.Attributes.Add("style", "visibility:visible"); but the modal popup does not display.
How can I display it when a ListView item is selected?
Since you've already defined your ModalPopup div as a server control (e.g. runat=server) and you're trying to decide if to show it or not in codebehind - just use the Visible property...
<div id="ModalPopup" Visible="false" runat="server">
....
</div>
And in your RadListView1_SelectedIndexChanged event in code behind just change Visible to true:
protected void RadListView1_SelectedIndexChanged()
{
ModalPopup.Visible = true;
}
and if you insist on changing the visibility attribute itself, you can use RegisterStartupScript like this:
protected void RadListView1_SelectedIndexChanged()
{
ClientScript.RegisterStartupScript(this.GetType(), "ShowPopup", "document.getElementById('" + ModalPopup.ClientID + "').style.visibility = 'visible';", true);
}

ASP.NET li/ul tagged 'Menu' not working

I have a "menubar" of sorts on my aspx page (jsddm). The items appear when the mouse hovers over the top-level menu item, and disappear when the mouse leaves. When I hit F5 on my virtual machine it works great (my vm is running Win 2003 server and using IE 8.0.6001.18702, also runs VS2008).
However, when I publish it (hosted in IIS on the same VM) and try to view it from my regular machine (Win 7 with IE 8.0.7600.16385) the little buggers won't work properly.
Any help as to why this is would be greatly appreciated! Thanks!
Here's the code so you can see what I'm talking about:
#jsddm
{ margin: 0;
padding: 0;}
#jsddm li
{ float: left;
list-style: none;
font: 12px Tahoma, Arial;}
#jsddm li a
{ display: block;
background: #20548E;
padding: 5px 12px;
text-decoration: none;
border-right: 1px solid white;
width: 70px;
color: #EAFFED;
white-space: nowrap;}
#jsddm li a:hover
{ background: #1A4473;}
#jsddm li ul
{ margin: 0;
padding: 0;
position: absolute;
visibility: hidden;
border-top: 1px solid white;}
#jsddm li ul li
{ float: none;
display: inline;}
#jsddm li ul li a
{ width: auto;
background: #9F1B1B;}
#jsddm li ul li a:hover
{ background: #7F1616;}
#GetPolicy
{ text-align: left;}
.style1
{
width: 100%;
}
.style2
{
width: 282px;
}
.style3
{
height: 100px;
}
.style4
{
height: 100px;
width: 303px;
}
.style5
{
width: 303px;
}
#ltrVariables
{
width: 553px;
height: 329px;
}
.style6
{
width: 358px;
}
.style7
{
width: 228px;
}
.ModalPopupBG
{
background-color: #666699;
filter: alpha(opacity=50);
opacity: 0.7;
}
.HellowWorldPopup
{
min-width:200px;
min-height:100px;
background:white;
border-color:Silver;
border-style:ridge;
border-width:medium;
}
.HeaderStyle
{
color:Black;
background-color:Black;
border-style:solid;
}
.PopupHeader
{
color:Black;
background-color:white;
}
.style8
{
height: 20px;
}
</style>
</head>
<body leftmargin="0" topmargin="0"
background="Images/tile-grey-stripe.jpg">
<form id="Form1" defaultbutton="GetPolicy" runat="server">
<table width="1000" height="99" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="35" background="../Images/a_ag01.jpg"></td>
<td width="524"><img src="Images/a_ag1.jpg" alt="" width="524" height="99" border="0" align="top" /></td>
<td width="389">
<table border="0" cellspacing="0" cellpadding="0" width="389">
<tr>
<td width="218"><img id="imgHeader" src="Images/text_title_producer1.jpg" style="height:99px;width:218px;border-width:0px;" /></td>
<td width="111"><img id="imgHeadr2" src="Images/text_title-TILE.jpg" style="height:99px;width:171px;border-width:0px;" /></td>
</tr>
</table>
</td>
<td width="19" align="right"><img src="Images/a_ag4_end.jpg" width="19" height="99" alt="" /></td>
<td align="right" width="33" background="Images/a_ag5.jpg"></td>
</tr>
</table>
<!--end of the header table -->
<table height="702" width="1000" border="0" cellpadding="0" cellspacing="0" align="center">
<tr>
<td width="70" background="Images/b_ag1_lefttile.jpg"> <!-- This is the left wall of the form !-->
</td>
<td width="880" valign="top" bgcolor="#FFFFFF">
<!-- Text, controls, buttons, etc goes below this comment. !-->
<script src="/App_Themes/Default/jquery.js" type="text/javascript"></script>
<script type="text/javascript">
var timeout = 500;
var closetimer = 0;
var ddmenuitem = 0;
function PrintBatchJS()
{if(confirm("Send the ENTIRE batch to printing? (All letters will be removed from system)"))
{var PDFval = document.getElementById('<%= pnlPDF.clientID %>');
if (PDFval == null)
{if (confirm("Send the entire batch to print and delete them from the database?"))
{document.cookie="PDF=True";
window.location = "../Main.aspx";}}}}
function ViewBatchJS()
{var PDFval = document.getElementById('<%= pnlPDF.clientID %>');
if (PDFval == null)
{document.cookie="PDF=True";
document.cookie="View=True";
window.location = "../Main.aspx";}}
function ShowModal()
{$find('ModalPopupExtender1').show()};
function ShowConditionalModal()
{if (document.getElementById("<%= txtPolicyNo.clientID %>").value != "")
if (Page_IsValid)
{$find('ModalPopupExtender1').show()}};
function HideModal()
{$find('ModalPopupExtender1').hide();}
function InvalidClientNumber()
{alert("Wrong Number."); }
function GetLetterForm()
{$find('ModalPopupExtender1').show();
document.ltrVariables.location = document.getElementById("<%= lstNames.clientID %>").value + ".aspx";
document.getElementById("<%= lstNames.clientID %>").disabled = true;
document.getElementById("<%= txtPolicyNo.clientID %>").disabled = true;
document.getElementById("<%= GetPolicy.clientID %>").disabled = true;
$find('ModalPopupExtender1').hide();}
function ResetPanel()
{__doPostBack('pnlMaster', 'PanelReset');}
function GoToBatchOps()
{window.location = "../BatchOperations.aspx";}
function LogOut()
{window.location = "../Login.aspx";}
function jsddm_open()
{ jsddm_canceltimer();
jsddm_close();
ddmenuitem = $(this).find('ul').css('visibility', 'visible');}
function jsddm_close()
{ if(ddmenuitem) ddmenuitem.css('visibility', 'hidden');}
function jsddm_timer()
{ closetimer = window.setTimeout(jsddm_close, timeout);}
function jsddm_canceltimer()
{ if(closetimer)
{ window.clearTimeout(closetimer);
closetimer = null;}}
$(document).ready(function()
{ $('#jsddm > li').bind('mouseover', jsddm_open)
$('#jsddm > li').bind('mouseout', jsddm_timer)});
document.onclick = jsddm_close;
</script>
<ul id="jsddm">
<li>File
<ul>
<li><a onclick="__doPostBack('pnlMaster', '');">New Policy</a></li>
<li><a onclick="PrintBatchJS()">Print Batch</a></li>
<li><a onclick="ViewBatchJS()">View Batch</a></li>
<li><a onclick="LogOut()">Log Out</a></li>
</ul>
</li>
<li>Tools
<ul>
<li><a onclick="GoToBatchOps()">Batch Operations</a></li>
</ul>
</li>
<li>Help
<ul>
<li><a onclick="LogOut()">Contents</a></li>
</ul>
</li>
<asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server" EnablePageMethods="true">
</asp:ToolkitScriptManager>
</ul>
Without seeing the HTML markup that your page is generating, it's hard to pin point the problem.
If JSDDM is Jquery Simple Drop Down Menu, then the problem may be the virtual directory that VS will launch a website in by default
ie. set up a new website called 'www', then the local URL will default to something like 'http://localhost:8123/www/'. However after you have published and you are using IIS, if you are just pointing at the published folder, then your URL may be 'http://localhost/'.
Check you Script tag and see what URL your javascript is being loaded from - if it is being loaded from '/www/' then URL would not be valid on the IIS site.
I would usually remove the virtual directory from the VS website settings to avoid these kind of problems.

Fieldset padding in IE8

I am pretty new to web work. I apologize if this question is trivial or overkilled. I did some searching for fieldset padding, but didn't see anything specific to this.
Here is what my window looks like in Chrome vs IE8.
Chrome: http://i.stack.imgur.com/rH7w0.png
IE8: http://i.stack.imgur.com/6v6kZ.png
As you can see, all of the padding has been completely thrown away.
<fieldset>
<legend>Refresh Settings</legend>
<table>
<tr>
<td class="AutoRefreshEnabled">
Auto-Refresh Enabled:</td>
<td class="AutoRefreshCheckbox">
<asp:CheckBox ID="CheckBox1" runat="server" AutoPostBack="True" oncheckedchanged="CheckBox1_CheckedChanged" />
</td>
<td class="AutoRefreshNumericTextbox">
<telerik:RadNumericTextBox ID="RadNumericTextBox1" Runat="server"
Label="Auto-Refresh Interval (Minutes):" MaxValue="60" MinValue="0"
ShowSpinButtons="True" Value="0" Width="225px" Enabled="False"
LabelCssClass="riLabel LabelDisabled">
<NumberFormat DecimalDigits="0" />
</telerik:RadNumericTextBox>
</td>
</tr>
</table>
</fieldset>
<fieldset>
<legend>Tab Settings</legend>
<div>
<div class="FloatLeft">
<telerik:RadListBox ID="RadListBox1" runat="server" AllowDelete="True" AllowReorder="True"
EnableDragAndDrop="True" Skin="Web20" Height="95px"
onclientitemdoubleclicked="OnClientItemDoubleClicked"
onclientselectedindexchanged="OnClientSelectedIndexChanged"
Width="150px" AutoPostBack="True" AutoPostBackOnReorder="True"
onreordering="RadListBox1_Reordering" onclientload="OnClientLoad">
</telerik:RadListBox>
</div>
<div class="FloatRight">
<telerik:RadTextBox ID="RadTextBox1" Runat="server" EmptyMessage="Enter tab name" Skin="Web20" Width="150px">
</telerik:RadTextBox>
<div class="TabButton">
<telerik:RadButton ID="RadButton1" runat="server" onclick="RadButton1_Click" Skin="Web20" Text="Add Tab"
onclientclicked="OnButtonClicked">
</telerik:RadButton>
</div>
</div>
</div>
</fieldset>
<fieldset>
<legend>Tab Cycle Settings</legend>
<table>
<tr>
<td class="AutoCycleEnabled">
Auto-Cycle Enabled:</td>
<td class="AutoCycleCheckbox">
<asp:CheckBox ID="CheckBox4" runat="server" AutoPostBack="True" oncheckedchanged="CheckBox1_CheckedChanged" />
</td>
<td class="AutoCycleNumericTextbox">
<telerik:RadNumericTextBox ID="RadNumericTextBox2" Runat="server"
Label="Auto-Cycle Interval (Minutes):" MaxValue="60" MinValue="0"
ShowSpinButtons="True" Value="0" Width="225px" Enabled="False"
LabelCssClass="riLabel LabelDisabled">
<NumberFormat DecimalDigits="0" />
</telerik:RadNumericTextBox>
</td>
</tr>
</table>
</fieldset>
<div class="BottomButtons">
<telerik:RadButton ID="RadButton2" runat="server" Skin="Web20" Text="Apply" OnClientClicked="CloseAndSave" >
</telerik:RadButton>
<telerik:RadButton ID="RadButton3" runat="server" Skin="Web20" Text="Cancel" OnClientClicked="CloseAndCancel" >
</telerik:RadButton>
</div>
body
{
font-size: 12px;
font-family: "segoe ui",arial,sans-serif;
}
.LabelEnabled
{
color: Black !important;
}
.LabelDisabled
{
color: Gray !important;
}
.riTextBox
{
color: Black !important;
}
.AutoRefreshEnabled
{
width: 123px;
}
.AutoRefreshCheckbox
{
width: 20px;
}
.AutoRefreshNumericTextbox
{
width: 32px;
}
.AutoCycleEnabled
{
width: 123px;
}
.AutoCycleCheckbox
{
width: 20px;
}
.AutoCycleNumericTextbox
{
width: 32px;
}
.TimeframeRestricted
{
width: 314px;
}
.DataPointsShown
{
width: 314px;
}
.TimeframeCheckbox
{
width: 40px;
}
.DatapointsCheckbox
{
width: 40px;
}
.TimeframeDateTimePickers
{
width: 150px;
}
.FloatLeft
{
float: left;
}
.FloatRight
{
float: right;
padding-right: 55px;
}
.TabButton
{
text-align: left;
padding-top: 2px;
}
.BottomButtons
{
position: absolute;
left: 134px;
bottom: 13px;
}
Does anyone with more web development experience than I have an easy explanation for this issue? It would be much appreciated.
Thanks for your time.
it is an IE thing, and legend is the culprit a simpler fiddle with some "garish" coloring and forced padding shows the only fieldset that actually contains itself is the one without a legend - http://jsfiddle.net/eDtDh/
I have never used legend and I forgot why but I think this is the reason it's the same in IE7/6 etc.... you could build in your own legend via a heading element and relatively position it to look similar to a legend

Resources