$( "#tabs" ).tabs( "option", "disabled", 1);
Multiple tabs
$( "#tabs" ).tabs('option','disabled', [1, 2, 3, 4]);
world wide web development problems asp net php html xhtml css javascript jquery w3dproblems
$( "#tabs" ).tabs( "option", "disabled", 1);
$( "#tabs" ).tabs('option','disabled', [1, 2, 3, 4]);
var jcrop_api; function InitjCrop() { $('#id').Jcrop({ }, function () { jcrop_api = this; }); }To unhook jCrop
jcrop_api.destroy();To Hook jCrop again
InitjCrop();
<asp:LinkButton ...........CommandName="Insert">New</asp:LinkButton>to
<asp:LinkButton .......... CommandName="New">New</asp:LinkButton>
<asp:RangeValidator ID="RangeValidator1" runat="server" ErrorMessage="Invalid Date"
Type="Date" ControlToValidate="{}" MaximumValue="3000-12-12" MinimumValue="1900-12-12">
</asp:RangeValidator>
{?ShowPaid}
If it returns true object will be suppressed else no
protected void dsApplications_Selected(object sender, SqlDataSourceStatusEventArgs e) { int PageIndex = gvStudents.PageIndex; int start = PageIndex * gvStudents.PageSize + 1; int end = Math.Min(start + gvStudents.PageSize - 1, e.AffectedRows); navi.InnerHtml = string.Format("Showing record {0} - {1} of {2}", start, end, e.AffectedRows); }
protected void lv_ItemEditing(object sender, ListViewEditEventArgs e) { ListView lvSender = (ListView)sender; lvSender.InsertItemPosition = InsertItemPosition.None; } protected void lv_ItemUpdated(object sender, ListViewUpdatedEventArgs e) { ListView lvSender = (ListView)sender; lvSender.InsertItemPosition = InsertItemPosition.FirstItem; } protected void lv_ItemCanceling(object sender, ListViewCancelEventArgs e) { ListView lvSender = (ListView)sender; lvSender.InsertItemPosition = InsertItemPosition.FirstItem; }and then append this to list view
OnItemCanceling="lv_ItemCanceling" OnItemUpdated="lv_ItemUpdated" OnItemEditing="lv_ItemEditing"Hope this helps
<?phprequire_once ('../class.phpmailer.php');
// include("class.smtp.php"); // optional, gets called from within class.phpmailer.php if not already loaded
$mail = new PHPMailer(true); // the true param means it will throw exceptions on errors, which we need to catch$mail->IsSMTP(); // telling the class to use SMTPtry { $mail->Host = "mail.yourdomain.com"; // SMTP server $mail->SMTPDebug = 2; // enables SMTP debug information (for testing) $mail->SMTPAuth = true; // enable SMTP authentication $mail->SMTPSecure = "tls"; // sets the prefix to the servier $mail->Host = "smtp.gmail.com"; // sets GMAIL as the SMTP server $mail->Port = 587; // set the SMTP port for the GMAIL server $mail->Username = "yourusername@gmail.com"; // GMAIL username $mail->Password = "yourpassword"; // GMAIL password $mail->AddReplyTo('name@yourdomain.com', 'First Last'); $mail->AddAddress('whoto@otherdomain.com', 'John Doe'); $mail->SetFrom('name@yourdomain.com', 'First Last'); $mail->AddReplyTo('name@yourdomain.com', 'First Last'); $mail->Subject = 'PHPMailer Test Subject via mail(), advanced'; $mail->AltBody = 'To view the message, please use an HTML compatible email viewer!'; // optional - MsgHTML will create an alternate automatically $mail->MsgHTML(file_get_contents('contents.html')); $mail->AddAttachment('images/phpmailer.gif'); // attachment $mail->AddAttachment('images/phpmailer_mini.gif'); // attachment $mail->Send(); echo "Message Sent OK<p></p>\n"; }
catch(phpmailerException $e) { echo $e->errorMessage(); //Pretty error messages from PHPMailer }
catch(Exception $e) { echo $e->getMessage(); //Boring error messages from anything else! }
SessionIDManager manager = new SessionIDManager(); string newSID = manager.CreateSessionID(Context); bool redirected, cookieAdded; manager.SaveSessionID(Context, newSID, out redirected, out cookieAdded);
$.fn.extend({ insertAtCaret: function (myValue) { if (!this.selectionStart) thi = $(this).get(0); if (thi.selectionStart || thi.selectionStart == '0') { var startPos = thi.selectionStart; var endPos = thi.selectionEnd; var scrollTop = thi.scrollTop; thi.value = thi.value.substring(0, startPos) + myValue + thi.value.substring(endPos, thi.value.length); thi.focus(); thi.selectionStart = startPos + myValue.length; thi.selectionEnd = startPos + myValue.length; thi.scrollTop = scrollTop; } else { thi.value += myValue; thi.focus(); } } })
$('textarea')example of setting a value
$('textarea').val("Hi");DOM object
$('textarea').get(0)example of setting a value
$('textarea').get(0).value = "Hi";
CrystalReportViewer1.ID = "File name without Spaces and any weird characters";
ToText({datefield},"[DATE FORMAT]")DATE FORMAT EXAMPLES
Example | Output |
dd-MMM-yyyy | 07-Oct-2013 |
dd/MM/yyyy | 07/10/2013 |
exec sp_msforeachtable 'alter table ? drop column COL_NAME'
<%@ Page Async="true" AsyncTimeout="3000" ......
string url = "{url}";
string param = "name value pair data"; System.Net.WebClient webClient = new System.Net.WebClient();
string encoding = "application/x-www-form-urlencoded";
webClient.Headers[System.Net.HttpRequestHeader.ContentType] = encoding;
string res = webClient.UploadString(url, param);
int CountryId;
SqlDataReader reader = ...........
if (reader.HasRows) { reader.Read(); CountryId = reader.GetInt16(reader.GetOrdinal("CountryId"));But if CountryId is null it will throw an exception so use safe method
CountryId = !string.IsNullOrWhiteSpace(reader["CountryId"].ToString()) ?
Convert.ToInt32(reader["CountryId"]) : -1;
WeekDay ({DateGoesHere}, firstDayOfWeek)date(DateTime): Any valid date,
WeekDayName(WeekDay ({DateGoesHere}, firstDayOfWeek), false, firstDayOfWeek)
exec sp_msforeachtable 'alter table ? add {colname} {dataType} {null|not null} ....';
AccessFileName yourFileNameAll you need to do is to reload Apache and the new setting will take effect.
//Data Pager Outside ListView protected void lView_DataBound(object sender, EventArgs e) { dPager1.Visible = (dPager1.PageSize < dPager1.TotalRowCount); } //Data Pager Inside ListView protected void lView_DataBound(object sender, EventArgs e) { DataPager dPager = (DataPager)lView.FindControl("dPager1"); dPager.Visible = (dPager.PageSize < dPager.TotalRowCount); }
Anywhere | Same class | Derived Classes | Same Assembly | Derived Classes in another assembly |
|
Public | ![]() |
||||
Private | ![]() |
||||
Protected | ![]() |
![]() |
|||
Internal | ![]() |
||||
Protected internal |
![]() |
![]() |
MembershipUser user = Membership.GetUser({UserId}); user.ChangePassword(user.ResetPassword(), {NewPassword});
public String IP { get; }
When I specify get only I wont be able to set the property even inside the class itself. e.g
this.IP = "127.0.0.1";
Property or indexer 'IP' cannot be assigned to -- it is readonlySolution, just type private keyword with set property like this
public String IP { get; private set; }All done
public static DateTime GetFirstDayOfMonth(DateTime dt) { return new DateTime(dt.Year, dt.Month, 1); }Last day of month
public static DateTime GetLastDayOfMonth(DateTime dt) { return new DateTime(dt.Year, dt.Month, 1).AddMonths(1).AddDays(-1); }
Install Executable | Fixed Issues | MSI 32 Bit | MSI 64 Bit | MSM 32 Bit | ClickOnce 32/64 | ClickOnce "Homesite" | WEB XML Deployment |
---|---|---|---|---|---|---|---|
Support Pack 16 (v.13.0.16.1954 | SP16 Fixed Issues | 32bit.msi | 64bit.msi | 13_0_16.msn | Clickonce32/64 | clickonce32 clickonce64 | crdbxml16.msi |
Support Pack 15 (v.13.0.15.1840 | SP15 Fixed Issues | 32bit.msi | 64bit.msi | 13_0_15.msn | Clickonce32/64 | clickonce32 clickonce64 | crdbxml15.msi |
Support Pack 14 (v.13.0.14.1720) | SP14 Fixed Issues | 32bit.msi | 64bit.msi | 13_0_14.msn | clickonce32/64 | clickonce32 clickonce64 | crdbxml14.msi |
Support Pack 13 (v.13.0.13.1597) | SP13 Fixed Issues | 32bit.msi | 64bit.msi | 13_0_13.msn | clickonce32/64 | clickonce32 clickonce64 | crdbxml13.msi |
Support Pack 12 (v.13.0.12.1494) | SP12 Fixed Issues Wiki | 32bit.msi | 64bit.msi | 13_0_12.msn | clickonce32/64 | clickonce32 clickonce64 | crdbxml12.msi |
RTM (v. 13.0.0.x) | Release Notes Installation Guide | 32bit.msi | 64bit.msi | 13_0.msm | clickonce32/64 | clickonce32 clickonce64 | N/A |
System.IO.File.ReadAllBytes(filename);
<configuration> ....... <system.web> ...... <customErrors mode="Off"/> </system.web> </configuration>
Note: "mode values are case sensitive"
$("input[type=checkbox]").change(function () { var isChecked = this.checked; if (isChecked) { //rest goes here } });
1. cd /usr/local/cpanel/whostmgr/docroot/cgi 2. wget -N http://www.softaculous.com/ins/addon_softaculous.php 3. chmod 755 addon_softaculous.php 4. /usr/local/cpanel/3rdparty/bin/php addon_softaculous.php
CrystalReportViewer.AllowedExportFormats =
(int)CrystalDecisions.Shared.ViewerExportFormats.PdfFormat
REPLACE({String}, CHAR(13)+CHAR(10), '')Source:http://stackoverflow.com/questions/951518/replace-a-newline-in-tsql
SELECT s.name AS SchemaName , t.NAME AS TableName , p.rows AS RowCounts , FORMAT(SUM(a.total_pages) * 8 / 1024.0, 'N2') AS TotalSpaceMB , FORMAT(SUM(a.used_pages) * 8/ 1024.0, 'N2') AS UsedSpaceMB , FORMAT((SUM(a.total_pages) - SUM(a.used_pages)) * 8 / 1024.0, 'N2') AS UnusedSpaceMB FROM sys.tables t INNER JOIN sys.schemas s ON t.schema_id = s.schema_id INNER JOIN sys.indexes i ON t.OBJECT_ID = i.object_id INNER JOIN sys.partitions p ON i.object_id = p.OBJECT_ID AND i.index_id = p.index_id INNER JOIN sys.allocation_units a ON p.partition_id = a.container_id WHERE t.NAME NOT LIKE 'dt%' AND t.is_ms_shipped = 0 AND i.OBJECT_ID > 255 GROUP BY s.name , t.Name , p.Rows ORDER BY p.Rows DESC