This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<asp:GridView ID="GridView1" runat="server" CssClass="dataGrid" | |
DataSourceID="SqlDataSource1" AllowPaging="True" AutoGenerateColumns="false" | |
OnRowDeleting="grid_onRowDeleting" OnRowUpdating="GridView1_OnRowUpdating" | |
AutoGenerateEditButton="true" AutoGenerateDeleteButton="true" | |
PageSize="20" GridLines="None" Width="99%"> | |
<AlternatingRowStyle CssClass="odd" /> | |
<Columns> | |
<asp:TemplateField HeaderText="App Id"> | |
<ItemTemplate> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protected void GridView1_OnRowUpdating(object sender, GridViewUpdateEventArgs e) | |
{ | |
// if APP_ID in the grid bind with Eval method, it will be exception below | |
// But if you use Bind instead of Eval it will be ok. | |
rowToUpdate = e.NewValues["APP_ID"]; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function($) { | |
// your plug-in code here | |
})(jQuery); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function($) { | |
$.log = | |
{ | |
log: function(message) { | |
//if('console' in window && 'log' in window.console) | |
if (typeof window.console != 'undefined' && typeof window.console.log != 'undefined') { | |
console.log(message); | |
} | |
else { | |
// do nothing |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<asp:UpdatePanel runat="server" ID="calendarUpdatePanel"> | |
<ContentTemplate> | |
<uc1:Calendar ID="Calendar1" runat="server" /> | |
</ContentTemplate> | |
</asp:UpdatePanel> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protected void Page_Load(object sender, EventArgs e) | |
{ | |
Calendar1.SelectionChanged += CalendarSelectionChanged; | |
} | |
private void CalendarSelectionChanged(object sender, EventArgs e) | |
{ | |
DateTime selectedDate = ((Calendar) sender).SelectedDate; | |
string url = "HistoryRates.aspx?date=" | |
+ HttpUtility.UrlEncode(selectedDate.ToShortDateString()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function openWindow(url) | |
{ | |
var w = window.open(url, '', 'width=1000,height=600,toolbar=0,status=0,location=0,menubar=0,directories=0,resizable=1,scrollbars=1'); | |
w.focus(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dynamic messagePost = new ExpandoObject(); messagePost.picture = "https://yaplex.com/media/default/logos/yaplex.png"; | |
messagePost.link = "https://yaplex.com/"; messagePost.name = "[name] Facebook name..."; // "{*actor*} " + "posted news..."; | |
//<---{*actor*} is the user (i.e.: Alex) messagePost.caption = "[caption] Facebook caption"; messagePost.description = | |
"[description] Facebook description..."; messagePost.message = "[message] Facebook message..."; string acccessToken = "xxxx5120330xxxx|4xxxxx0c0f95bd3f62dxxxxx.1-10000xx4x73xxxx|2xx5xxx0566xxxx|z2xxxx37dxxxxsdDS23s_Sah34a"; | |
FacebookClient appp = new FacebookClient(acccessToken); try { var postId = appp.Post("24351740xxxxxx" + "/feed", messagePost); | |
} catch (FacebookOAuthException ex) { //handle oauth exception } catch (FacebookApiException ex) { //handle facebook exception | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ProductDAL | |
{ | |
public virtual List<Product> GetProducts() | |
{ | |
// connect to DB and get products | |
return new List<Product>(); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ProductBL | |
{ | |
private readonly ProductDAL dal; | |
public ProductBL(ProductDAL dal) | |
{ | |
this.dal = dal; | |
} | |
public List<Product> GetProducts() |
OlderNewer