Tag Archives: Visual Studio.Net

Passing Value from .aspx page to user control using C#/ ASP.Net

Step1: Create property on User Control for setting and getting a value.

public Guid? ToRoleID
{
get
{
if (ViewState["idRole"] == null)
{
return Guid.Empty;
}
return Guid.Parse(ViewState["idRole"].ToString());
}
set { ViewState["idRole"] = value;}
}

Step2: Assign value to user control property in .aspx page

UCRoleMenuPermissions1.ToRoleID = idRole;

Step3: Override DataBind method for user control in .aspx page

public override void DataBind()
{
string To = ToRoleID.ToString();
FillGrid();
}

Step4: Call User Control Data Bind method in .aspx page

UCMyControl.DataBind();

Binding enum to RadioButtonList using C#/ ASP.Net

For example, we have an enum like this:

public enum Status
{
Lock,
UnLock,
}

And we want to bind this with Radio Button List in C# / ASP.Net

Your .aspx will look like this:

<asp:RadioButtonList runat="server" ID="RadioButtonList1" RepeatDirection="Horizontal">
</asp:RadioButtonList>

Whereas in .cs page you will bind it like this:

RadioButtonList rbl = (RadioButtonList)e.Row.FindControl("RadioButtonList1");


rbl.DataSource = Enum.GetValues(typeof(Status));
rbl.DataBind();

Preparing for Microsoft Exam 70-480

Here goes the list of topics to be covered for Microsoft Exam

70-480 – Programming in HTML5 with JavaScript and CSS3

General References

navTick MSDN HTML5 Reference

navTick Pluralsight (paid developer training – excellent resourcce)

navTick Microsoft Virtual Academy Jump Start

Implement and Manipulate Document Structures and Objects (24%)

navTick HTML5 Tag Reference (w3Schools)

navTick Using HTML5’s New Semantic Tags Today

navTick Better Web Forms with HTML5 Forms

navTick Introducing the HTML5 storage APIs

navTick How to Use HTML5’s Local Storage Tools Today

AppCache API

navTick A BEGINNER’S GUIDE TO USING THE APPLICATION CACHE

navTick Offline Web Applications

navTick Go offline with application cache

navTick Running your web applications offline with HTML5 AppCache

navTick HTML5 App Cache (W3Schools) 

Geolocation

navTick Geolocation API Specification

navTick 12 Cool HTML5 Geolocation Ideas

navTick Finding your position with Geolocation

JavaScript
navTick Javascript – The this keyword
navTick Understanding the “this” keyword in JavaScript

navTick JavaScript: The Good Parts

navTick Creating custom objects in JavaScript

navTick JavaScript Create Your Own Objects

Implement Program Flow (25%)

navTickJavaScript Switch Statement

navTickJavaScript If…Else Statements

navTickJavaScript For Loop

navTickJavaScript Try…Catch Statement

navTickJavaScript Throw Statement

navTickScope in JavaScript

navTickUnderstanding callback functions in Javascript

navTickGetting comfortable with Javascript callbacks

navTickTHE BASICS OF WEB WORKERS

navTickIntroducing HTML5 Web Workers

navTickHTML5 Web Workers

Access and Secure Data (26%)

navTick Regular Expressions – pay attention to practical examples like URLs and email addresses.

navTick HTML5 Forms

navTick MAKING FORMS FABULOUS WITH HTML5

navTick HTML5 Input Types

navTick HTML5 Form Elements

navTick Fun with HTML5 Forms

JSON – Consuming a Service

Using jQuery to Consume ASP.NET JSON Web Services
navTick Using jQuery to Consume ASP.NET JSON Web Services » Encosia
navTick jQuery.getJSON() – jQuery API
navTick jQuery.parseJSON – jQuery API
navTick How to consume RESTful Services using jQuery and/or Javascript

JSON Transmit Data

navTick jQuery – Transmitting Data Using JSON
navTick JQuery: Send JSON Objects with an ajax request
navTick using ajax and jquery to load dynamic content in a website

Use CSS3 in Applications (25%)

navTick CSS3 Tutorial

navTick 25+ Fresh jQuery and CSS3 Tutorials

navTick HTML 5 Canvas

navTick QUICK HITS WITH THE FLEXIBLE BOX MODEL

navTick CSS3 Flexible Box Layout Explained

CSS Selectors

navTick Selectors
navTick CSS Reference
navTick Selectutorial – CSS selectors

jQuery Selectors

navTick Selectors – jQuery API
navTick jQuery Selectors