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
samanta
NA
429
135.6k
write line from c# to javascript function
Dec 24 2014 7:31 AM
i am trying to write below line highlighted by red color to javascript function.
how to do this?
my c# function
private void BindInitalView()
{
try
{
SqlCommand objCommand = new SqlCommand();
objCommand.CommandText = "SELECT [prd_ID] ,[img_ID],[img_X],[img_Y],[img_Thumb],img_Description,img_Title" +
" FROM [test].[dbo].[tblProductImage]";
objCommand.CommandType = CommandType.Text;
objCommand.Connection = _databaseConnection;
SqlDataReader objRs = objCommand.ExecuteReader();
while (objRs.Read())
{
string imageTagId = objRs["img_ID"].ToString();
string title = objRs["img_Title"].ToString();
string description = objRs["img_Description"].ToString();
string pointX = objRs["img_X"].ToString();
string pointY = objRs["img_Y"].ToString();
// how can i add this line inside javascript functon
"imageTagsObj.addImageTag('" + imageTagId + "','" + title + "','" + description + "','" + pointX + "','" + pointY + "'); \n";
}
objCommand.Dispose();
}
catch( Exception ex){
}
my javascript function
function setImageTags() {
//
imageTagsObj.addImageTag(imageTagId, title, "", description, pointX, pointY, 0, 0, false, false);
}
Reply
Answers (
2
)
=>Difference between these two( "" & String.Empty)
Object reference not set to an instance of an object.