Friday, 12 October 2012

Bind Menu Control With Database In Asp.Net

Hello guys Now Explaining You how you bind menu control in
with value which coming from database.
Let Consider that you have database contain two table 1st table Contain menu detail they are as follow 1) Menu ID
2)Menu Name
3)Menu Value
4)Navigate URL
5)Parent ID
2nd table is Menuid and userRole Mapping table contain following 1) Menu ID
2) Role

Now As per role you can get the menu Datatable from database by writing query for that lets see we have datatable wchich contain menu information.
now front side we have one menu item control as

on server side write following code in pageload method
 dtMenu = GetMenu(Session["Role"].ToString()); //this is datatable

//which contain information menu which you want to bind for that userrole
  ShowMenu(NavigationMenu.Items, 0); 

now here is ShowMenu Method

Wednesday, 3 October 2012

MICROSOFT.ACE.OLEDB.12.0 Provider is not register on local machine

Hello Guys,
I developed an internal application with 2010, it creates oledb connection and opens excel file.
 I started the coding when I had office 2007, when other people tried to install it on their machines, these with office 2007 would be fine but these with office 2010 would get error message
 "The 'Microsoft.Ace.OLEDB.12.0' provider is not registered on the local machine".

Then I found Following Solution For Above Problem

It Will solved in Following Steps

STEP 1 )
Download Following Files
                1)Acess Database Engine.exe