7722 2
Error: Requires either publish_to_groups permission and app being installed in the group, or manage_pages and publish_pages.. when posting on facebook pages using Graph API explorer

Hi, I want to test if I can post from my app under facebook developer to my page facebook (my manager page) please look below image.

But I have got this error message as shown below

...
Type
Question
7713 2
How to add windows authentication sql server connection string in Web Config?

I am currently using Entity Framework in my ASP.NET MVC web application, I would like to use windows authentication in SQL Server string, so how can do it?

Currently, I have web.Config configuration using username/password of SQL Server in the connection string as below

...
Type
Question
7662 1
Validate Coupon code in asp.net by Calling WebMethod using javascript or jQuery

I need help to calculate resulted amount after applying coupon code, the thing is when user enter the coupon code, it can be of two type 0/1, suppose this is the table

Voucher Code

Amount

Off_type

Test

50

0

Demo

10

1

Now if the Off_type is 1, then Amount to be deducted should be as rupees, and if Off_type 0, then amount to be deducted should be percent of total.

For example: If total amount(without discount) is 100, and Coupon code is "Demo", then after discount total amount to be paid will be 90, as 100 - 10% Of (Total) =90

So I am not able to implement this functionality using jQuery and WebMethod, here is my current code

jQuery

...
Type
Question
7622 0
Convert PDF to HTML using C# in ASP.NET MVC
In this example, I have explained how you can convert PDF to HTML using C# and pdftohtml.exe in ASP.NET MVC
Type
Article
7572 1
How to create N Level Of TreeView from database in asp.net

Hello Guys !!

I have already asked the same question but now I am again asking with the new requirement, so please read carefully and solve my issues.

 My Requirement:

  •    How to create n level of Treeview in asp.net c# from SQL Database Record.

Explaining my Requirement

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="N-level-Treeview.aspx.cs"
Inherits="N_level_Treeview" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:TreeView ID="TreeView1" runat="server" ImageSet="XPFileExplorer" NodeIndent="15">
<HoverNodeStyle Font-Underline="True" ForeColor="#6666AA" />
<NodeStyle Font-Names="Tahoma" Font-Size="8pt" ForeColor="Black" HorizontalPadding="2px"
NodeSpacing="0px" VerticalPadding="2px"></NodeStyle>
<ParentNodeStyle Font-Bold="False" />
<SelectedNodeStyle BackColor="#B5B5B5" Font-Underline="False" HorizontalPadding="0px"
VerticalPadding="0px" />
</asp:TreeView>
</div>
</form>
</body>
</html>?

: -  I have a table and there are Srno,PId, Pname, CID, CName,Cqty columns in my table.

Suppose if CID is also in PID column,  Node must be created on that CID and also must have expand button to show the child of that cID.

What i have done in coding let's see...

CS--------

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
 
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
public partial class N_level_Treeview : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!this.IsPostBack)
{
DataTable dt = this.GetData("SELECT cId, cName FROM TopBill");
this.PopulateTreeView(dt, 0, null);
}
}
 
private void PopulateTreeView(DataTable dtParent, int parentId, TreeNode treeNode)
{
foreach (DataRow row in dtParent.Rows)
{
TreeNode child = new TreeNode
{
Text = row["cName"].ToString(),
Value = row["cId"].ToString()
};
if (parentId == 0)
{
TreeView1.Nodes.Add(child);
DataTable dtChild = this.GetData("SELECT srNo,cid, cName FROM TopBill WHERE pid = " + child.Value);
PopulateTreeView(dtChild, int.Parse(child.Value), child);
}
else
{
treeNode.ChildNodes.Add(child);
}
}
}
 
private DataTable GetData(string query)
{
DataTable dt = new DataTable();
string constr = ConfigurationManager.ConnectionStrings["constr"].ConnectionString;
using (SqlConnection con = new SqlConnection(constr))
{
using (SqlCommand cmd = new SqlCommand(query))
{
using (SqlDataAdapter sda = new SqlDataAdapter())
{
cmd.CommandType = CommandType.Text;
cmd.Connection = con;
sda.SelectCommand = cmd;
sda.Fill(dt);
}
}
return dt;
}
}
}

-------------- Current Output of my Code is ...

...

Type
Question

7569 0
Save Selected Dropdown and Text value in database in ASP.NET Web-Forms
In this article, I have provided step by step procedure to create dropdown from database and add new dropdown values in database in ASP.NET Web-Forms.
Type
Article
7518 1
No parameterless constructor defined for this object.

Hi, i am getting this issue while running a page in MVC, it was working fine previously, but i now i am getting the error as below

...
Type
Question
7489 0
Send mail in ASP.NET (Web-Form using C#)
In this article, I have provided sample code to send email in asp.net web form using C# code, i have also provided code to send email with attachment in ASP.NET
Type
Article
7427 1
How to Edit data using pop-up modal in knockout js and MVC?

How can I edit/update value using pop-up modal in knockout js and MVC?

My data is being displayed in a table using knockout but when the user clicks on edit button, text boxes, values should prefill with data in pop up model against particular id, but I am not able to achieve this.

...
Type
Question
7402 0
Creating GridView in ASP.NET Core MVC with Paging
In this article, I have provided step by step procedure to create grid view in ASP.NET Core MVC with data from database using Entity Framework and Bootstrap pagination.
Type
Article

Page 15 of 31