15,891,828 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Member 12652465 (Top 13 by date)
Member 12652465
28-Aug-23 8:09am
View
can you recommend a debugger to use, i use vs code to work.
Member 12652465
28-Aug-23 7:08am
View
The update part updated the expected table, and the insert did not insert to the expected table, but there were no error message.
Member 12652465
11-Dec-22 10:53am
View
I fixed the strings, and tried again, I still get the 400 error code, still saying "one or more validation error occurred". I can't really figure out where the problem is...
Member 12652465
20-Jan-17 16:17pm
View
I did just as you said, and still get the
CS0012: The type 'System.Threading.Tasks.Task`1' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Threading, Version=1.0.2856.102, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
Member 12652465
19-Jan-17 16:18pm
View
update:
<runtime>
<assemblyBinding appliesTo="v2.0.50727" xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentassembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0" />
<autogeneratebindingredirects>true
Member 12652465
19-Jan-17 16:14pm
View
I am done this, yet still get the same error.
below is part of my web.config, is anything wrong here?
<runtime>
<assemblyBinding appliesTo="v2.0.50727" xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentassembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0" />
<autogeneratebindingredirects>true
Member 12652465
19-Jan-17 1:22am
View
Please can you an example with a code sample
Member 12652465
19-Jan-17 1:21am
View
Deleted
I have removed the NuGet already.
Member 12652465
26-Sep-16 6:30am
View
protected void Page_Load(object sender, EventArgs e)
{
// ** Player Calls**
if (!Page.IsPostBack)
{
if (!object.Equals(Session["UserId"], null))
{
string getPlayerCallsQuery = "SELECT P.PlayerCallId, P.ScID, G.Id FROM PalsCallList AS P, GameRegister AS G WHERE (G.Id='" + Session["UserId"].ToString() + "' and G.Id = P.ScID )";
dt = dbClass.ConnectDataBaseReturnDT(getPlayerCallsQuery);
if (dt.Rows.Count > 0)
{
PalsCallList.DataSource = dt;
PalsCallList.DataBind();
}
}
}
// **Get Player Games**
if (!Page.IsPostBack)
{
if (!object.Equals(Session["UserId"], null))
{
string getPlayerGames = "SELECT m.ScID, m.PlayerName, m.PlayerCallId, G.Id FROM mGame AS m, GameRegister AS G WHERE (G.Id='" + Session["UserId"].ToString() + "' and G.PlayerName = m.PlayerName )";
dt = dbClass.ConnectDataBaseReturnDT(getPlayerGames);
if (dt.Rows.Count > 0)
{
GridViewPlayerGames.DataSource = dt;
GridViewPlayerGames.DataBind();
}
}
}
}
// The click event
protected void PalsCallList_ItemCommand(object source, DataListCommandEventArgs e)
{
if (!IsPostBack)
{
if (!object.Equals(Session["UserId"], null))
{
if (e.CommandName == "Accept")
{
Label PlayerCallID = (Label)e.Item.FindControl("PlayerCallId1");
string PlayerCallID2 = PlayerCallID.Text;
string getPlayerCallId = "SELECT COUNT(*) FROM mGame WHERE (PlayercallId = '" + PlayerCallID2 + "')";
string getPlayerName = "SELECT PlayerName FROM GameRegister WHERE (Id = '" + Session["UserId"].ToString() + "')";
DataSet ds = new DataSet();
SqlCommand cmd = new SqlCommand();
object dPlayerCallId = dbClass.ExecuteDBScalar(getPlayerCallId);
object dPlayerName = dbClass.ExecuteDBScalar(getPlayerName);
int scalarValue1 = (Int32)dPlayerCallId;
string scalarValue2 = dPlayerName.ToString();
string PlayerName = scalarValue2;
string PlayerCallId = PlayerCallID2;
string ScID = Session["UserId"].ToString();
if (scalarValue1 < 4)
{
string CreateGame = "INSERT INTO [mGame] (ScID,PlayerName,PlayerCallId) VALUES('" + Session["UserId"].ToString() + "','" + PlayerName + "','" + PlayerCallId + "')";
dbClass.ConnectDataBaseToInsert(CreateGame);
string DeletePal = "DELETE (*) From PalsCallList where (ScId ='" + Session["UserId"].ToString() + "'AND PlayerCallId ='" + PlayerCallId + "')";
dbClass.ConnectDataBaseToDelete(DeletePal);
Response.Redirect("~/GamePage.aspx?Id=" + Session["UserId"].ToString());
}
}
}
}
}
Member 12652465
12-Aug-16 11:02am
View
Hi, Please help, I posted a question, but it was voted to be closed. I have tried all I could to resolve but to no avail. I improved my question as below.
I am working on a web application that has many pages including Master page. One page I call UserBestPage.aspx (not real name) has GridView control that has a custom template, in the template I have a PlaceHolder control with ID= phRow where I will like to put Button control dynamically at run time. So in UserBestPage.aspx.cs I also have a Class I called CreateUserButton that will create three buttons that I will user in the same code-behind page by calling their method.
My question is, how do I code my CreateUserButton Class, and how to call the method to where I want it to be.
This is the code I tried:
public class CreateUserButton
{
}
public void CreateUser1Button()
{
ContentPlaceHolder ContentPlaceHolder1 = Page.Master.FindControl("ContentPlaceHolder1") as ContentPlaceHolder;
PlaceHolder phRows = (PlaceHolder)ContentPlaceHolder1.FindControl("phRow");
Button b = new Button();
phRow.Controls.Add(b);
}
Member 12652465
30-Jul-16 9:31am
View
But how do I resolve the issue. I am still new in this. please help.
Member 12652465
28-Jul-16 1:09am
View
Hi, thanks for your help so far. I tried the code the former error message was gone, but new error message is: System.NullReferenceException: Object reference not set to an instance of an object.pointing to placeholder.Controls.Add(button);
Member 12652465
25-Jul-16 14:00pm
View
Hi, thanks for your help so far. I tried the code the former error message was gone, but new error message is: System.NullReferenceException: Object reference not set to an instance of an object.pointing to placeholder.Controls.Add(button);
Show More