TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Guest User
Tech Writer
189
24.8k
Object reference not set to an instance of an object.
Jun 16 2018 1:03 AM
appproperty.cs
public
DataTable getclientresource(
string
para_ResourceType ,
object
MobileNo )
{
DataTable _getclientresource = maincon.getDataTable(
"select distinct ClientMaster.ClientName,ClientResources.DisplayName,LinkClientUser.Clientid,LinkClientUser.ClProductId,ClientResources.AccessKey FROM LinkClientUser"
+
" LinkClientUser inner join softplus_clients.ClientMaster ClientMaster on LinkClientUser.clientid = ClientMaster.clientid "
+
" inner join ClientResources ClientResources on ClientResources.ClProductId = LinkClientUser.ClProductId and ClientResources.ResourceType = LinkClientUser.ResourceType and ClientResources.AccessKey = LinkClientUser.AccessKey "
+
" where LinkClientUser.mobileno= '"
+ MobileNo +
"' and LinkClientUser.ResourceType = '"
+ para_ResourceType +
"' "
,
"dtcomplist"
);
return
_getclientresource;
}
Controller
object
mobileno;
appproperty app =
new
appproperty();
Profile p;
public
ActionResult CompanyList()
{
mobileno = Session[
"MobileNo"
];
DataTable dt =
new
DataTable();
dt = app.getclientresource(
"LBROKSYS"
, mobileno);
foreach
(DataRow dr
in
dt.Rows)
{
p.Displayname = dr[
"DisplayName"
].ToString();
p.ClProductId = dr[
"ClProductId"
].ToString();
Session[
"ClProductId"
] = dr[
"ClProductId"
].ToString();
}
return
View();
}
Reply
Answers (
3
)
pdf create in itextsharp in asp.net
How to Use Font Awesome Icons in Asp.net Button?