displaying gridview header with no data


Click here for more dotnet tutorials

create a new web application.
add gridview to your webpage.click on smart tag of grid view
add columns- select bound field (give header text and data field(column name in db))

grid view  properties
– auto generate columns = false
– show header when empty = true

edit template of gridview- empty data template – add a label with text as no items.

in page load write code to fill gridview with a table with no data.

what is node js?


node js a server side javascript.
It is fast in execution.
It is having a very good windows azure support.
The below Microsoft windows azure link helps you to work with node j.
http://www.windowsazure.com/en-us/develop/nodejs/tutorials/create-a-website-(mac)/install node js sdk.

windows azure?


Using windows azure save your money and time.windows azure is a Microsoft cloud computing platform.using the knowledge working on database server you can work on the cloud resources.azure data centers are in 6 places around the world two in asia, two in North America and two in Europe.you can choose datacenter which ever is close to you and your customers to deploy your data into that.infinite scale:

You can extend memory for your applications in the cloud servers easily without any limits.

inserting data into azure table including posted time


inserting question and answers into azure datatable with name questions from windows html javascript app.

you have to install mobile sdk from windows azure portal and add it as reference following below steps to work on the below code.

http://technologiesdotnet.blogspot.in/

also add  script tag in the html page to use azure mobile services in the project.

<script type=“text/javascript” src=“/MobileServicesJavaScriptClient/MobileServices.js”></script>



html code:

  

Time now is:

           

Insert Questions

            Category:&nbsp Select One
                DotNET
                C Sharp
                ASP.NET
                Windows8
                     
           

            Question:&nbsp&nbsp

             Answer:&nbsp&nbsp&nbsp&nbsp&nbsp

           

js function code:

function insertquestions()
{
    var client = new Microsoft.WindowsAzure.MobileServices.MobileServiceClient(
       “https://aaaaaaaaa.azure-mobile.net/“,
       “aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa”
   );
 //use your credentials to make this code work
    //to get present time
    var currentDate = new Date();
    var day = currentDate.getDate();;
    var month = currentDate.getMonth() + 1;
    var year = currentDate.getFullYear();

    var currentTime = new Date();
    var hours = currentTime.getHours();
    var minutes = currentTime.getMinutes();
    if (minutes < 10) {
        minutes = “0” + minutes
    }
    var d = day + “/” + month + “/” + year + ” ” + hours + “:” + minutes;
    //inserting data into azure table
 var item = { Category: document.getElementById(“selectcategory”).value, Question: document.getElementById(“txtquestion”).value,Answer: document.getElementById(“txtanswer”).value, Time: d };
    client.getTable(“Questions”).insert(item);
}

displaying date time now in javascript


javascript code to display present data and time:

timenow is the id of my paragraph tag in which  iam displaying the below output.

output:

14/11/2012 6:48

javascript code:

var currentDate = new Date();
    var day = currentDate.getDate();;
    var month = currentDate.getMonth() + 1;
    var year = currentDate.getFullYear();

    var currentTime = new Date();
    var hours = currentTime.getHours();
    var minutes = currentTime.getMinutes();

    if (minutes < 10)
    {
        minutes = “0” + minutes

    }
  

    var d =  day + “/” + month + “/” + year +” “+ hours + “:” + minutes;
    document.getElementById(“timenow”).innerHTML = “Time now is: ” + d;

what is blob in windows azure?


Windows azure blob is used for storing large amount of unstructured data.

Data stored in blob can be accessed using http and https.

Uses of blob:
for accessing images documents, storing files, streaming audio and video, storing data backup
 Blob service contains: storage account     |container     |  blob     |  data store data in blobs, a container can have multiple blobs, an account can have multiple containers.

steps to create blob:

login to windows azure portal.

new(bottom of the screen)
data service
storage
quick create
give some url
select geo location
also select geo replication

create storage account.

your new account is ready.

use connection string of windows azure in Windows Azure service configuration system (*.csdef and *.cscfg files).

and if you are using in webapplications use it in web.config.

to create containers:

click on storage from the left vertical menu.
click on your account name
click on containers from the top menu
create new container.

adding live tiles to javascript html metro windows 8 app


When your app is installed, atile is added to your start screen.
By default it displays standard tile.
For adding standard tile to html js windows 8 app – http://technologiesdotnet.blogspot.in/2012/11/adding-tiles-to-javascript-html-metro.html

To make your normal tile as live tile you have to show some updated content on  your tile.
for that you can use local notifications to show some content on your tiles.

For intellisense when you are working with live notifications, toasts and tiles you have to use notificationsextension library in your code.
This notification extension library is available in app-tiles-and-badges-sample you download from Microsoft website.

http://code.msdn.microsoft.com/windowsapps/app-tiles-and-badges-sample-5fc49148

download javascript sample
extract it
open c#,javascript folder
open it in visual studio 2012
build it.\
now

go to your project – solution explorer – references – add reference – browse winmd file from the below location in the sample you build before and add reference to your project.

C#,JavaScript\bin\Debug\NotificationsExtensions.winmd

Now you can use three methods – TileContent, BadgeContent and ToastContent

sample javascript code to add badge on tile:
add the below code in default.js page inside app event listener

js code:

 var badgeContent = new NotificationsExtensions.BadgeContent.BadgeNumericNotificationContent(85);
        var badgeNotification = badgeContent.createNotification();
        Windows.UI.Notifications.BadgeUpdateManager.createBadgeUpdaterForApplication().update(badgeNotification);

js code live notifications:

  //live tiles
        var tileContent = NotificationsExtensions.TileContent.TileContentFactory.createTileWideText03();
        tileContent.textHeadingWrap.text = “Primaccess”;
      

        var squareTileContent = NotificationsExtensions.TileContent.TileContentFactory.createTileSquareText04();
        squareTileContent.textBodyWrap.text = “Infinite Oppurtunities”;

        tileContent.squareContent = squareTileContent;
        var tileNotification = tileContent.createNotification();
        Windows.UI.Notifications.TileUpdateManager.createTileUpdaterForApplication().update(tileNotification);

js code toast notifications:
        //toasts
        var toastContent = NotificationsExtensions.ToastContent.ToastContentFactory.createToastText02();
     
        toastContent.textHeading.text = “Primaccess”;
        toastContent.textBodyWrap.text = “Infinite Oppurtunities”;
      
        toastContent.launch = ‘{“type”:”toast”,”param1″:”12345″,”param2″:”67890″}’;

        var toast = toastContent.createNotification();
        Windows.UI.Notifications.ToastNotificationManager.createToastNotifier().show(toast);

showing selected item in asp.net menu with different style


change the static selected style properties of asp.net menu which are visible on the menu item which is selected.

select asp.net menu.
-properties
-static selected style
change fore color (color of the text of the recently selected menu item)
change back color (background color  of the recently selected menu item)
If you click on a menu item it will have different properties which shows that you are on that page now.