15,883,961 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 mtoha (Top 39 by date)
mtoha
19-Mar-24 23:28pm
View
Where is code when you assign Con object? Is the connection string is correct?
Stop being ridiculous, and paste ex message in exception if any. what does the meaning of NOT WORKING?
mtoha
12-Jun-23 5:35am
View
this style is called cowboy coding.. new style of coding anounced at 1900.
mtoha
12-Jun-23 3:22am
View
change to this:
txtTotal.Text = getTotal("Select ISNULL(sum(convert(decimal, isnull(total_netpay, 0)),0) from emp_payroll where PDate is not null AND DATENAME(week, PDate) = DATENAME(week, getdate()) AND year(getdate()) = year(PDate)").ToString("#,##0.00");
mtoha
12-Jun-23 2:57am
View
Select ifnull(sum(total_netpay),0) from emp_payroll where week(PDate) =week(now()). if that sql above is fine, maybe the error occured at another function not there,
mtoha
12-Jun-23 2:36am
View
when you debug string sql on get total, what is the value of sql string?
mtoha
12-Jun-23 2:22am
View
what is get total function?
mtoha
19-May-23 18:13pm
View
https://learn.microsoft.com/en-us/windows/win32/api/mfreadwrite/nf-mfreadwrite-imfsinkwriter-finalize If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
that finalize should give return error. try to catch return message from finalize method .
mtoha
19-May-23 18:02pm
View
https://stackoverflow.com/questions/33767688/video-recording-hangs-on-imfsinkwriter-finalize/33878513#33878513 try to check this thread,..
mtoha
18-May-23 7:54am
View
When you succeed to reset password is this message appeared? "Password reset successfully." What is the data containing when success? If that message is already appeared on success, try this :
// console.log($('#forgot-password').serialize());
$.ajax({
url: "forgot-password.php",
type: "POST",
data: formData,
success: function(data){
if(data == "success"){
alert("Password reset successfully.");
$('#forgot-password')[0].reset();
window.location.href = "dashboard.php";
}else if(data == "error"){
alert("Invalid email or OTP code.");
}else if(data == "password_mismatch"){
alert("New password and confirm password do not match.");
}else{
alert("Something went wrong. Please try again later.");
}
}
});
Note: Should you not import jQuery twice. When I try your existing code, $("#forgot-password").submit(function(event){
that method is not called. I change it to : $("#forgot-password .btn-primary").click(function(event){
and this is fired.
mtoha
18-May-23 6:30am
View
I would recommend you change report type to RDLC format. Instead of RDL
This code is painful. RDLC has report designer, you can use report viewer too.
This case is like when I am forgotten to install Font, and the characters being ???????.
Or when I use RDLC to show barcode, if I forgotten to install font, the barcode is not showing.
Is this happened to client or at server? If this is happened to all Computers, maybe bugs.
mtoha
18-May-23 6:10am
View
If you see the designer, try to check the Font. Like my picture at answer. The Font Type is SimSun. Previously, the default is Arial
mtoha
18-May-23 1:48am
View
can you add picture and codes how you make components on your report?
Are you using RDL or RDLC?
If you use RDL, I read from this site, it is can add component and use Style block to modify FontStyle.
https://www.grapecity.com/blogs/how-to-create-rdl-report-net-c-sharp-code#Creating_an_RDL_report
Like this:
customerFooter[0].ReportItems.Add(new GrapeCity.ActiveReports.PageReportModel.TextBox()
{
Name = "Company Name",
Value = "=\"Total Customer Count: \" & CountRows()",
Style = {
VerticalAlign ="Middle",
PaddingLeft="3pt",
TextAlign = "Left",
FontWeight = "Bold" }
});
If you giving up about this case, consider to move to RDLC format. it is easier to modify from UI designer set the FontStyle by UI. Like my program shown
mtoha
18-May-23 1:38am
View
have you succeed to save chinese characters on database? Sometimes, if SQL Server and some databases failed to detect encoding, the characters saved it to unreaded characters. if you debug it, when characters loaded from SQL server, is it on correct chinese format?
mtoha
17-May-23 17:27pm
View
As far as I know, Your custom fonts should be installed on Operating System (eg : Windows),
Have you install SimSun font?
mtoha
17-May-23 6:40am
View
to get list of data.list[i].SubType.Name, you can use LinQ. var allSubtypeName = data.List.SelectMany(b => b.SubType).Distinct(); from this you can select again using LinQ and get list of Subtype.Name
mtoha
17-May-23 6:38am
View
Deleted
I am using PDFsharp and this lib generates error. For free library, as far as I know, there are few library for PDF you can search at nugget. For free library, usually for GPU lisence, not for business or propietary application.
mtoha
17-May-23 6:38am
View
I am using PDFsharp and this lib generates error. For free library, as far as I know, there are few library for PDF you can search at nugget. For free library, usually for GPU lisence, not for business or propietary application.
mtoha
17-May-23 3:17am
View
is this javascript? Or you want to collect data using Backend? can you draw to the excel, how is the data shown at excel?
mtoha
17-May-23 2:25am
View
in short, what is your talking about? Where is the images and codes?
mtoha
16-May-23 23:27pm
View
try to use
catch(Exception ex)
{
MessageBox.Show(ex.ToString());
}
You use SqlException at this case.
Try to move your code from SqlCommand into try block like this:
try
{
SqlCommand cmd = new SqlCommand(query, conn);
cmd.Parameters.AddWithValue("Name_First", txtbox_first_name.Text);
cmd.Parameters.AddWithValue("Name_Last", txtbox_last_name.Text);
And what is the value of connectionString if you debug it?
mtoha
10-May-23 21:40pm
View
You should check the form sent twice or not. on the request. you can use js loader to prevent user click form twice
mtoha
10-May-23 3:29am
View
where is html form code?
Is it using ajax post or using Form?
mtoha
8-May-23 6:44am
View
I am agree with above comment. never store file in the database. I store my file to hdd/ssd disk space or file store firebase or something like that. You can also using FTP if needed.
mtoha
8-May-23 4:54am
View
I would recommend, you use temporary file to save original excel. Then doing modification using excel library, and then save modified excel.
mtoha
6-May-23 22:18pm
View
console.log("data is" + data);
what is the response?
have you succeed to get branch data based on country?
mtoha
2-May-23 22:13pm
View
What kind of project? asp.net mvc? asp.net webform? What is the version of .NET?
mtoha
27-Apr-23 5:15am
View
Gerry giving correct direction. you should close the access connection after finish querying
mtoha
17-Apr-23 11:17am
View
I usually using get method. i.e. you want to get picture, so the web api read files from server, and return base64 string.
and client (xamarin) decode from base64 to image.
for read file using get method, there is no file size restriction as I know.
mtoha
17-Apr-23 9:19am
View
what is client in this line? var response = await client.PostAsync(url,content);
Are you want to upload file more than 16384? What is correct size? in byte or Kb? WEB API built with .net core or .net? what version of .net (core)
mtoha
17-Apr-23 3:47am
View
this is great direction. thank you
https://learn.microsoft.com/en-us/ef/core/testing/testing-with-the-database
mtoha
17-Apr-23 2:58am
View
I am glad to hear you can solve the problem.
At my case, I try both of my functions, that is working.
I use JWT header also while testing that methods. and using Post sending some params.
That alternatives is working too for me
mtoha
14-Apr-23 5:49am
View
second function using restSharp, and some methods is deprecated. You can also try this
public async Task<m> ConnectRestClient<r, m="">(string apiUrl, R reqModel)
{
M model = default(M);
RestClient restClient = new RestClient(apiUrl);
RestRequest restRequest = new RestRequest(apiUrl, RestSharp.Method.Post);
restRequest.AddParameter(
"application/json",
JsonConvert.SerializeObject(reqModel),
ParameterType.RequestBody);
RestResponse restResponse = await restClient.ExecuteAsync(restRequest);
if (restResponse.IsSuccessful)
{
string response = restResponse.Content;
model = JsonConvert.DeserializeObject<m>(response);
}
return model;
}
mtoha
14-Apr-23 5:14am
View
that request have no header, you should add it by custom above method.
And I want to see what is the response of the request and how you try it? What you passed at function.
mtoha
12-Apr-23 21:21pm
View
are you sure post parameters sent is api_key and email?
are you sure with your url?
mtoha
10-Apr-23 9:20am
View
Alright. great.. You are welcome
mtoha
9-Apr-23 3:06am
View
is your report loading big size of data? You are just browse one report or browse directory in browse path?
mtoha
6-Apr-23 3:38am
View
This script shoould replaced : ScriptManager.RegisterStartupScript(this, this.GetType(), "HidePopup", "$('#MyDispach').modal('show')", true);
to :
ScriptManager.RegisterStartupScript(this, this.GetType(), "HidePopup"+Guid.NewGuid().ToString(), "$('#MyDispach').modal('hide')", true);
Use developer mode, and run at console,
$('#MyDispach').modal("hide");
is the modal closed?
if your key isn't changed this script will only execute once
mtoha
6-Apr-23 2:10am
View
actually, when I am having that error, I am just skip that error. SQL DB Project sometimes buggy, and no problem with another .NET Project.
mtoha
14-Jan-19 1:24am
View
I hope code project provide feature to do this. Upload image file and text file to the forum discussion, etc.
That is will be great..
Show More