Hi To know how to bind Dropdown using Select2. Please reffer my old Post
How To Bind Select2
Now i will give you one example to Get Selected Value.
Jquery
--------
var AuthorList= $("#AuthorList").val();
HAPPY CODING
Wednesday, April 10, 2013
Wednesday, July 25, 2012
CS0012: The type 'System.Data.Objects.DataClasses.EntityObject' is defined in an assembly that is not referenced.
When using Entity frame work . passing the data with control i got one error
"Compiler Error Message: CS0012:
The type 'System.Data.Objects.DataClasses.EntityObject' is defined in
an assembly that is not referenced. You must add a reference to assembly
'System.Data.Entity, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089'."
After R & D i found solution. so i am posting this solutions because i don't want to waste your lot of time like as i did.
here is solution type following code in your web config file
" "
Thanks Happy Coding
Tuesday, July 17, 2012
Hide/Show Div With Smooth Effect.
Hi i am giving you one example to show and hide div with smooth effect .
My html Code:
<div id="done" style="display:none;">
write content here
</div>
My Java Script Code
<script>
$('#done').fadeIn('slow');
setTimeout(function () {
$('#done').fadeOut('slow');
}, 2000);
</script>
My text To Show
Happy Coding
My html Code:
<div id="done" style="display:none;">
write content here
</div>
My Java Script Code
<script>
$('#done').fadeIn('slow');
setTimeout(function () {
$('#done').fadeOut('slow');
}, 2000);
</script>
My text To Show
Happy Coding
Wednesday, July 11, 2012
How to Define action Link Using Areas In MVC
Hi..
I am giving one example to define Action Link Url Using Multiple Areas..
I am using two areas with Name
a) Control
b) System
.
@Html.ActionLink("Main Home", "Index", "Home", new { Area = "" }, null)
@Html.ActionLink("
Control Home", "Index", "ControlHome", new { Area = "Control" }, null)
@Html.ActionLink("
System Home", "Index", "SystemHome", new { Area = "System" }, null)
Happy Coding
I am giving one example to define Action Link Url Using Multiple Areas..
I am using two areas with Name
a) Control
b) System
.
Happy Coding
Monday, July 9, 2012
Import Excell,csv file into Linq
I have csv file with name infocontext, having two fileds
1.Alies
2. ShortDesc
Now i am importing My Excel data from csv file to database using Linq (Entity Framework in MVC3)
I have table Infocontext
1. Create properties of class for Table
--->
public class InfoContext
{
public string Tag { get; set; }
public string Alias { get; set; }
}
2. Now Write this Method
public ActionResult ImportCSV()
{
// Object of My Class
InfoContext Dtinfo = new InfoContext();
// Import data from csv file
var dataImport = System.IO.File.ReadAllLines(Server.MapPath("~/Areas/Cataloging/infocontext.csv"));
for(int i=0;i<=dataImport.Length;i++)
{
// Split data from Excel by column
string[] word = dataImport[i].Split(',');
for(int k=0;k<=word.Length-1;i++)
{
Dtinfo.Alias = word[0];
Dtinfo.ShortDesc = word[1];
db.InfoContext.Add(Dtinfo); // Saving data by code first tech. you can write your own method to save data
db.SaveChanges();
}
}
return View();
}
Data is Saved..
Happy Programing
1.Alies
2. ShortDesc
Now i am importing My Excel data from csv file to database using Linq (Entity Framework in MVC3)
I have table Infocontext
1. Create properties of class for Table
--->
public class InfoContext
{
public string Tag { get; set; }
public string Alias { get; set; }
}
2. Now Write this Method
public ActionResult ImportCSV()
{
// Object of My Class
InfoContext Dtinfo = new InfoContext();
// Import data from csv file
var dataImport = System.IO.File.ReadAllLines(Server.MapPath("~/Areas/Cataloging/infocontext.csv"));
for(int i=0;i<=dataImport.Length;i++)
{
// Split data from Excel by column
string[] word = dataImport[i].Split(',');
for(int k=0;k<=word.Length-1;i++)
{
Dtinfo.Alias = word[0];
Dtinfo.ShortDesc = word[1];
db.InfoContext.Add(Dtinfo); // Saving data by code first tech. you can write your own method to save data
db.SaveChanges();
}
}
return View();
}
Data is Saved..
Happy Programing
Saturday, June 9, 2012
Google Map in 3d
Now explore your Maps View in 3d with New Google 3d Map 6.0.
Features
- Tilt
- Rotate
- Compass Mode
- Smooth Zooming
- Offline Reliability
- Offline Building and Rerouting
Friday, June 8, 2012
Write a program to list files in the current working directory depending upon a given pattern.?
♣♣♣ WRITE A PROGRAM TO LIST FILES IN THE CURRENT WORKING
DIRECTORY DEPENDING UPON A GIVEN PATTERN. ♣♣♣
import java.lang.*;
import java.io.*;
class pro15
{
public static void
main(String ar[]) throws IOException
{
InputStreamReader
a=new InputStreamReader(System.in);
BufferedReader
b=new BufferedReader(a);
System.out.print("\n\tEnter
the Directory Name : ");
String
s=b.readLine();
File f=new
File(s);
if(f.exists())
{
if(f.isDirectory())
{
String []f1=f.list();
int i;
for(i=0;i
{
String tp=f1[i];
if(tp.endsWith("java"))
System.out.println("\n\t\t"+tp);
if(tp.endsWith("class"))
System.out.println("\n\t\t"+tp);
}
}
}
}
}
OUTPUT :-
Enter
The Directory Name : d:\
Test.java
Test.class
Abc.java
Abc.class
Applet2.java
Subscribe to:
Posts (Atom)
