$("#DatePick").datepicker({
minDate: <%= DateTime.Now.ToShortDateString() %>
});
This will set min date to the current date. Only future dates are available to select. Set the 'minDate' argument to the date you need.
$("#DatePick").datepicker({
minDate: <%= DateTime.Now.ToShortDateString() %>
});
This will set min date to the current date. Only future dates are available to select. Set the 'minDate' argument to the date you need.
Use jQuery
$("ul.nav > li a[href*='pageName']").parent("ul.nav > li").addClass("active");
Check your CSS classes, to make sure they are not floating it over or repostioning it somehow.
Try casting it to a string
Name.Text = (string)Request.QueryString("Name");
What do you mean crashed? What did the error say?
Yes, you can even point your custom domian to it. There are some restrictions if your site has alot of traffic, but not to bad.
oops, modded version :-)
if (dat.Day == 11 || dat.Day == 12 || dat.Day == 13)
{
ord = "th";
}
else
{
switch (i)
{
case 1:
ord = "st";
break;
case 2:
ord = "nd";
break;
case 3:
ord = "rd";
break;
default:
ord = "th";
break;
}
}
Ah ... understand now. Your best bet would be to make a custom formatter. Here is one I've used. Stole the idea from someone awhile ago ... :-)
public class FormatOrdinal : IFormatProvider, ICustomFormatter
{
public object GetFormat(Type fType)
{
if (fType == typeof(ICustomFormatter))
return this;
return null;
}
public string Format(string format, object obj, IFormatProvider formatProvider)
{
if (!(obj is DateTime)) throw new Exception();
var dat = (DateTime)obj;
string ord;
switch (dat.Day % 10)
{
case 1:
ord = "st";
break;
case 2:
ord = "nd";
break;
case 3:
ord = "rd";
break;
default:
ord = "th";
break;
}
return string.Format("{0:MMMM} {1}{2}, {0:yyyy}", obj, dat.Day, ord);
}
}
}
Use it like this ...
string.Format(new FormatOrdinal(), "{0}", SomeDate);
Couple things that may make life easier ...
... you can usually refresh by hitting F5.
You can't ... unless you have access to a pbx.
Your site host needs to be able to support IIS. Not all hosting sites do.
If they don't your either going to have to find a new host, serve it yourself or use a different language.
Are you looking for a certain format?
This is what I do to keep the copyright set to the current year ...
<%= DateTime.Now.Year %>
If you need the whole date ...
<%= DateTime.Now.ToShortDateString %>
If your record count is fairly small you can use the .RecordCount attribute on the record set. Otherwise a seperate SQL statment returning an int of records counted.
Go into designer view, refresh and save the page, then go back into code view.
Sometimes the IDE is slow in writing to the .designer file.
Yes, call a stored procedure in the database that will list out the columns you want. Bind the results to the DataGrid.
Add font-awesome or one of the other icon stacks.<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
Example from Font-Awesome ( Font-Awesome ):
<div class="list-group">
<a class="list-group-item" href="#"><i class="fa fa-home fa-fw"></i> Home</a>
<a class="list-group-item" href="#"><i class="fa fa-book fa-fw"></i> Library</a>
<a class="list-group-item" href="#"><i class="fa fa-pencil fa-fw"></i> Applications</a>
<a class="list-group-item" href="#"><i class="fa fa-cog fa-fw"></i> Settings</a>
</div>
Make sure the path to your external files are correct. You can go to 'View Source' in the browser and click on an external file location. If it doesn't work, then you'll need to find out why.
Code example would help.
Looks like your trying to convert "monster.co.uk" to an int
Try to think of an interface as a class of classes. Each seperate class could be of a different type. It allows you to create very complex models.
Try removing the "http" on your links.
I.E. href="\somewebsite.com\css\site.css"
This is a hack that works if one of the sites is using https or http.
diafol ... nicely done.
I'd make a small change though (visual stuff):
body{
font-size: 60px;
}
.ring{
color:white;
text-align: center;
background-color:#CC0000;
padding: 5px;
}
Do you have access to Sql Mail?
Doesn't look like your calling LoadGrid() till after a dropdown selection. On page load you can do this, but you'll need to have some default start values.
Also, firstDate and secondDate values are not set till a dropdown selection. You might want to refactor and call LoadGrid() by passing the needed parameters: LoadGrid(DateTime firstDate, DateTime secondDate). Then on page load you can call it with default values.
Your trying to turn a DataSet into a Table explicitly which might not work ... try this:
public DataTable hrdoc1(int id)
{
DataSet ds = (Call DataSet here)
DataTable dt = ds.tables[0];
return dt;
}
Wrap it in an if then clause, checking a date?, then have a seperate panel with a message on why its not available. How are you going to stop them from voting twice? Coookies can be deleted ... a login page would be the only way, but even that can bve side stepped if you don't verify the user.
Accessibility ... Can it be read and navigated by anyone?
User Experiance ... Can I find what I want fast. Can I view it on my ... (Phone, tablet, laptop, desktop).
Is the content relevent to what the site is about?
On the grids row databound event you can access and run your method that would fill the dropdown. You can even set selected item after its loaded, by using a hidden value in the gridview data.
Is this an MVC or Forms page?
Grab an id from a grid row and then use that to get the detail information. Works best if you can put the id into a link button CommandArgument.
Example below:
<asp:templatefield>
<itemtemplate>
<asp:LinkButton ID="imgbtnGetDetails" commandargument='<%# Eval("sID") %>' commandname="DetailRow" cssclass="imgIcon" runat="server" >
Details
</asp:LinkButton>
</itemtemplate>
</asp:templatefield>
You need to check c1.SignUp, to see if the return value is true or false.
What is your procedure "GetMonthlyReport" bringing back?
Can you post the full Inner Exception text?
You need to clear the 2nd dropdown before loading it.
DropDownList2.Items.Clear()
Where is hrdoc1 called? Where is id set?
Because its an int, which defaults to 0.
Your code is going to fire as soon as the page is finished loading.
Try this, it works differently on IE and Firefox though:
$(window).bind('beforeunload', function() {
alert("You are attempting to leave this page. Are you sure want to leave MSJ Bank Financial?");
});
What are the extra/doubled parameter fields?
Is there a click event on the button?
You might want to rethink your database design. A catagory list should be a table lookup, which in turn is referenced in a data table.
You have a database diagram you could show?
What error are you getting?
Change <asp:Checkbox ID = "chklst" runat="server" />
to<asp:CheckBoxList ID="chklst" runat="server" AutoPostBack = "true"></asp:CheckBoxList>
To add to it, do this in your .cs file
chklst.Items.Add('Happy Birthday');
chklst.Items.Add('Happy Happy Birthday');
Try this:
private void RadGrid_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e)
{
if (e.Item is GridDataItem)
{
GridDataItem dataItem = e.Item as GridDataItem;
string contactName = dataItem["SomeField"].Text;
LinkButton button = dataItem["ColumnName"].Controls[0] as LinkButton;
button.Attributes["onclick"] = "return confirm('Are you Sure You Want to Delete User??')";
}
}
Example page? Rest of code?
With the information given, its acting like the container its in has a set or max width.
Create a User class, and add it to a Session.
Session["User"] = Users.GetUser(1);
Then you can grab the Session["User"] to fill any info you need.
Users usr = (Users)Session["User"];
string pass = usr.Password;
string usrName = usr.UserName;
<!DOCTYPE html>
<html>
<head>
<title>Floating problem</title>
<style type="text/css">
.mainWrapper{
background-color:red;
max-width:630px;
min-height:400px;
padding:0;
}
.one{
width:310px;
height:120px;
background-color:magenta;
float:left;
margin-bottom:10px;
}
.two{
width:310px;
height:120px;
background-color:magenta;
float:left;
}
.three, .four{
width:310px;
height:150px;
background-color:yellow;
float:left;
}
.three{
margin-right:10px;
}
/* .subThree1{
width:150px;
height:150px;
background-color:black;
} */
.one{
margin-right:10px;
}
</style>
</head>
<body>
<h2>Floating problem</h2>
<div class="mainWrapper">
<div class="one">
<p>1</p>
</div>
<div class="two">
<p>2</p>
</div>
<div class="three">
<p>3</p>
</div>
<div class="four">
<p>4</p>
</div>
<div style="clear:both;" />
</div>
</body>
</html>
Nothing wrong with using tables in a responsive site. Just make sure that word wrap is on. Some data by its nature is not able to be completly responsive though, and thats ok ...
Another option would be to put it in a horizontal form with labels. These would stack nicely if the viewport was to small.
Have you tried the jQuery Toggle
$('#< %= btnName.ClientID %>').click(function() {
$('#DivId').slideToggle('slow');
});
Use a Session[] ...
Session["Name"] = null;
Session["Name"] = txtBox.Text.Trim();
then in the page that your printing with, use it like so ...
string sName = Session"Name"] != Null ? Session["Name"].ToString() : string.Empty;
lblName.Text = sName;