Saturday, January 4, 2014

Get GridView Cell value using jQuery ASP.NET

In this tutorial I will show you how you can get the cell value of Grid View using jQuery

You will first need to populate your gridview using any datasource

than using the jquery below

$("#<%=gv1.ClientID %> tr").each(function () {
                    if (!this.rowIndex) return;
                    var row = $(this).find("td:first");
                    alert(row[0].innerText);
                });
gv1 is the name of our gridview

using the each loop we iterate on each row

td:first indicate that we are only getting value of first column

we can also use

td:last
td:even
td:odd
td:eq("index number")
td:gt("Include element that are past the given index")
td:lt("Include element that are before the given index")
td:not()

I hope it was informative for you and I would like to Thank you for reading

Saturday, December 21, 2013

How To OverLap A Div On Another Div C#

In this tutorial I will show you how can you overlap a div on another div. This is usefull for dropdowns

For this 2 properties of css are important
  • z-index:1;
  • position:absolute;
z-index
 
The z-index is use to define which div will appear in front, it does this by assigning a number so for example a div with z-index:1 will overlap a div with z-index:0

position

The div which you want to overlap to another div should have a property of either position:absolute or position:Fixed

I hope it was informative for you and I would like to Thank you for reading.

Wednesday, December 18, 2013

Connect ASPNETDB withVisual Studio

While configuring Web Site Administration Tool if you have encounters the following errors than you are at the right place 
  • There is a problem with your selected data store. This can be caused by an invalid server name or credentials, or by insufficient permission. It can also be caused by the role manager feature not being enabled. Click the button below to be redirected to a page where you can choose a new data store.
  • The following message may help in diagnosing the problem: Unable to connect to SQL Server database.

Provider Management

Could not establish a connection to the database.
If you have not yet created the SQL Server database, exit the Web Site Administration tool, use the aspnet_regsql command-line utility to create and configure the database, and then return to this tool to set the provider.
 

Solving this issue is quite simple, just follow the simple steps

1. Fist run the utility aspnet_regsql.exe to create your ASPNETDB

Now in order to connect to this DB within your visual studio

2. Inside Visual studio open up your project web.config file

3. Add the following lines inside <configuration> tag 

<connectionStrings>

    <remove name="LocalSqlServer"/>
    <add name="LocalSqlServer" connectionString="data source=.;DataBase=aspnetdb; Integrated security=true;"/>


  </connectionStrings>


There are three things in this connection string
  • data source (If your database is present on the machine on which you are working than leave it as it is)
  • DataBase (If you have explicitly changed your DataBase name than change aspnetdb with your DataBase Name)
  • integrated security (If you are using windows authentication than leave it as it is)
4. Save and Built

That's it now start ASP.NET Configuration(WSAT) and it should work properly this time

I hope it was informative for you and I would like to Thank you for reading

Tuesday, December 17, 2013

HOW TO IMPORT AND EXPORT SCHEMA IN ORACLE

Hello,

In oracle you can import and export user's schema i.e. tables and fields. This is important in a situation when you have created the tables on your computer and now want to move them on another computer.

In this tutorial I will first show you how to export the schema of a particular user and than how to import that schema. I will export the schema of user scott, you can use other account as well.

1. Open up your cmd

2. Now type exp scott file=c:\exp_scott.dmp

  • scott is the name of user who's schema I just exported
  • You can change the path and file name according to your need
Now I will create a new account name "ali" and imp this schema in that account, CLICK HERE if you don't know how to create an account in Oracle.

Now in order to imp the schema

3. Type imp fromuser=scott touser=ali file=c:\exp_scott.dmp

 
  • Replace scott name with the user name, who's schema you are about to import
  • Replace ali with the user name, who is going to imp this schema
  • Replace the path and file name to where you have saved the schema while exporting
You have now successfully imported the schema.

If you have any further queries than please don't hesitate to comment.

Thanks