15,889,876 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 basitsar (Top 87 by date)
basitsar
1-Aug-17 0:55am
View
Many Thanks
Below is the code but no success.
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="WebForm1.aspx.vb" Inherits="Test.WebForm1" %>
<title>
<asp:ScriptManager ID="ScriptManager1" runat="server">
<asp:UpdatePanel ID="UpdatePanel1" runat="server" >
<contenttemplate>
<asp:Panel runat="server" ID="Panel1" ChildrenAsTriggers="false">
<asp:DataList ID="DataList2" runat="server" p Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False" HorizontalAlign="Center" RepeatLayout="Table" OnItemCreated="DataList2_ItemCreated">
<itemtemplate>
<asp:Label ID="Label2" runat="server" Text='<%# Eval("FileName") %>'>
<asp:LinkButton ID="LinkButton1" runat="server" Text='<%# Eval("ImagePath") %>' CommandArgument='<%# Eval("Id")%>'>
basitsar
19-Feb-17 9:00am
View
Many Thanks
basitsar
24-Jan-17 10:11am
View
Thanks for your help.
below is the query which solved my problem
SELECT *
FROM Trn_ATN a
WHERE
2 = (SELECT count(DISTINCT(b.ATN_Date))
FROM Trn_ATN b WHERE
a.ATN_Date <= b.ATN_Date and a.ATN_AstNo=b.ATN_AstNo)
basitsar
24-Jan-17 9:43am
View
Thanks a lot.
below query is giving me second last record
select * from Trn_ATN where ATN_No=(select max(ATN_No)-1 from Trn_ATN)
but i want to show the record depend on ATN_AstNo
Thanks
Basit.
basitsar
24-Jan-17 9:31am
View
Many Many Thanks but the result of above query is
ATN_No ATN_Date ATN_AstNo
1 2016-01-01 1
basitsar
14-Dec-16 5:32am
View
Thanks A lot. Below code solved problem in Master.
function calculate() {
var myBox1 = document.getElementById("<%= TextBox1.ClientID %>").value;
var myBox2 = document.getElementById("<%= TextBox2.ClientID %>").value;
var result = document.getElementById('result');
document.getElementById("<%= txtDiscount.ClientID %>").value = ((myBox1 - myBox2) / myBox1) * 100;
}
basitsar
14-Dec-16 5:30am
View
Deleted
Thanks A lot dear, as you said below code working fine in master
function calculate() {
var myBox1 = document.getElementById("<%= TextBox1.ClientID %>").value;
var myBox2 = document.getElementById("<%= TextBox2.ClientID %>").value;
var result = document.getElementById('result');
document.getElementById("<%= txtDiscount.ClientID %>").value = ((myBox1 - myBox2) / myBox1) * 100;
}
But when i typied in txtDiscount directly then its coming "NaN"
Thanks
Basit.
basitsar
9-Dec-16 1:50am
View
What i tried is created a temporary table called Temp_Stock columns are temp_ItmNo, temp_StockQty, temp_Location then first enter whatever stock in stock table enter in Temp_Stock then check the MIS transaction and whatever select date after the MIS_Qty enter in Temp_Stock.
How to do query in sql query
Thanks
Basit.
basitsar
6-Dec-16 0:10am
View
Thanks A lot. But o/p is coming NaN
basitsar
2-Dec-16 12:07pm
View
What my question is in my inventory system how to maintain the stock table. i have two type of idea to maintain stock table. One stock table have the following field. ItemNo, GRNNo, PONo, MrNo, StockQty and StockUnitprice. In this table when i receive the Material then it will add the field as new row in stock, or another stock table is ItemNo, StockQty and StockUnit price here when receive the material then it will check the stockmaster and if the item available in stock the add/update the qty and update avgprice im asking which one is good. thanks Basit.
basitsar
17-Nov-16 6:20am
View
Thanks A lot.
basitsar
31-Aug-16 6:35am
View
Dear, there is no relation between thoes table only need to check start & endDate with operation table and check attendance table if employee is in between start & endDate then show this table.
Thanks
Basit.
basitsar
20-Aug-16 7:35am
View
Many Many Thanks
basitsar
20-Aug-16 7:24am
View
It means that while creating table we can create constraint after creating table cannot? Is that correct?
basitsar
20-Aug-16 6:38am
View
Got error
Incorrect syntax near the keyword 'ADD'.
basitsar
20-Aug-16 6:35am
View
got error
Incorrect syntax near the keyword 'ADD'.
basitsar
20-Aug-16 6:23am
View
not working showing error
Incorrect syntax near the keyword 'OFF'.
basitsar
20-Aug-16 6:18am
View
CREATE UNIQUE CLUSTERED INDEX UIX_User
ON dbo.[User]([User_Name])
then got error.
Column '[User_Name]' in table 'dbo.User' is of a type that is invalid for use as a key column in an index.
basitsar
20-Aug-16 6:13am
View
no how to do this
basitsar
9-Jun-16 5:04am
View
Many Many Thanks
basitsar
9-Jun-16 4:08am
View
I want to clear more about opening Balance Qty. Suppose i have store many items are there. One by one i will add into stock table and StockQty/OpenQty Column will updated. After Good Issue transaction will updated then StockQty will change accordingly. Is that correct? or I need to create another column called openingBalQty where i can store OpeningBalQty. Becoz stockQty will Changed according to transaction
basitsar
9-Jun-16 0:08am
View
Thanks A lot. In Mst_Stock Table i have StockQty, but I don't have column called opening qty and this StockQty will (+) & (-) depend upon GRN or GIN. Is the opening qty if we enter first time in stock table then it should not change is that correct?
basitsar
19-May-16 6:51am
View
Thanks A lot. I will not use word "Dear" Appreciated. Thanks
basitsar
19-May-16 6:13am
View
Dear, Why i'm putting the data into D:/ becoz i want to host website locally. not over internet or any production server. why i'm not putting on c:/ or in website folder becoz its in C driver where OS is installed.
basitsar
19-May-16 5:57am
View
I tried Image1.ImageUrl = Server.MapPath("D:\Images\AnyImage.bmp") then got error is a physical path, but a virtual path was expected.
basitsar
8-May-16 5:32am
View
Thanks A lot.
basitsar
8-May-16 5:31am
View
Thanks A lot.
basitsar
6-May-16 12:37pm
View
Server PC. And SQL Management also on server. Only to open exe file through sql query.
What exactly want to create trigger when data inserted then open then exe file and run other things.
Thanks
Basit.
basitsar
6-May-16 11:47am
View
same pc dear
basitsar
6-May-16 11:46am
View
Same PC.
basitsar
27-Apr-16 0:28am
View
Got error asking to enter parameter c.PurchaseDate popup coming
basitsar
26-Apr-16 14:09pm
View
Thanks Alot, but showing "You tried to execute a query that does not include the specific expression 'Price' as part of an aggregate function"
basitsar
19-Apr-16 5:39am
View
Is there any update for msaccess
basitsar
18-Apr-16 7:00am
View
with the help of below code convert image to base64
Public Function ConvertFileToBase64(ByVal fileName As String) As String
Return Convert.ToBase64String(System.IO.File.ReadAllBytes(fileName))
End Function
basitsar
18-Apr-16 1:54am
View
Dear,
Below is the code to convert image to base64
Public Function ConvertFileToBase64(ByVal fileName As String) As String
Return Convert.ToBase64String(System.IO.File.ReadAllBytes(fileName))
End Function
basitsar
16-Apr-16 8:30am
View
Dear im asking in msaccess this query also work?
basitsar
16-Apr-16 6:18am
View
thanks alot.
is this work in msaccess.
SELECT ItemCode, PurchaseDate, Price
FROM (SELECT *, ROW_NUMBER() OVER (PARTITION BY ItemCode ORDER By PurchaseDate DESC) AS rn
FROM Trn_Purchase) x
WHERE rn = 1
basitsar
16-Apr-16 4:02am
View
yes each item code
basitsar
6-Apr-16 4:23am
View
Dear,
Thanks for reply, but see as i mention, leavestart and leaveend can be anything. if suppose leavestart and leaveend at same year then no problem i will get year(leaveend) and group by this is easy
but if
LeavStart- 28-Dec-2015
LeaveEnd - 05-Jan-2016
then result should
2015 - 4 days
2016 - 5 days
here if i took same query year(leaveend) and group then result
2016 - 9 days that's wrong.
need to be seprate.
Thanks
Basit.
basitsar
6-Apr-16 3:55am
View
Yes dear searching means doing logic. may be need to get every period start and end date and minus from that
basitsar
27-Mar-16 7:07am
View
Dear,
i want from vb.net, becoz for some time interval the exe will work and execute .net code.
for interval i will use windows task sheduler
basitsar
24-Nov-15 0:34am
View
no till now not tried any thing
basitsar
23-Nov-15 23:53pm
View
Thanks A lot.
basitsar
23-Nov-15 23:53pm
View
Thanks A lot.
basitsar
23-Nov-15 23:53pm
View
Thanks A lot.
basitsar
19-Nov-15 2:11am
View
Another thing dear, how to get the sum of that difference?
select CONVERT(varchar(10), DATEDIFF(HOUR,@StartDate,@EndDate)) +':'+CONVERT(varchar(10), DATEDIFF(MINUTE,@StartDate,@EndDate)%60 ) as DifferenceHour
Means how to get the sum of DifferenceHour column.
basitsar
19-Nov-15 2:07am
View
Many Thanks Dear, Perfect.
basitsar
3-Nov-15 0:07am
View
Thanks problem Solved
basitsar
2-Nov-15 23:36pm
View
Thanks A lot dear, But when i used this showing (0 row(s) affected), and when i deleted header then it inserted rows.
Thanks
Basit.
basitsar
1-Sep-15 7:46am
View
Thanks A lot dear, I download whatsapp API thru NuGet Consol.
Then how to do the coding?
Thanks
Basit.
basitsar
31-Aug-15 3:25am
View
Thanks Alot Dear
basitsar
19-Aug-15 6:28am
View
Thanks A lot.
basitsar
17-Aug-15 3:55am
View
Many Many Thanks. The problem has been solved.
basitsar
17-Aug-15 3:10am
View
Dear Thanks A lot. I have edited trigger.
Below is the Trigger
ALTER TRIGGER [dbo].[CallInserted]
ON [CM].[dbo].[CustomersCalls]
FOR update
AS
BEGIN
DECLARE @us_email varchar(500);
DECLARE @CallNo varchar(500);
DECLARE @CallNo2 varchar(500);
DECLARE @CallComplaint varchar(1000);
DECLARE @LineMgrEmail varchar(500);
DECLARE @Status varchar(500);
SET NOCOUNT ON;
IF EXISTS (SELECT * FROM inserted)
BEGIN
SELECT @us_email = EmailAddress
FROM inserted i,
Users u
WHERE u.UserNo = i.AssignedBy;
SELECT @LineMgrEmail = EmailLineManager
FROM inserted i,
Users u
WHERE u.UserNo = i.AssignedBy;
SELECT @CallNo ='Notification :Call Number is :' + SPACE(1)+ CallNumber
FROM inserted
SELECT @CallNo2 ='Notification :Call Closed, Call Number is :' + SPACE(1)+ CallNumber
FROM inserted
SELECT @Status =[Status]
FROM inserted
SELECT @CallComplaint = Complaint
FROM inserted
EXEC msdb.dbo.sp_send_dbmail
@recipients = @us_email,
@profile_name = 'SendEmailCM2',
@subject = @CallNo,
@body_format = 'html',
@body = @CallComplaint
END
END
What i want is if @Status=1 then
EXEC msdb.dbo.sp_send_dbmail
@recipients = @us_email,
@profile_name = 'SendEmailCM2',
@subject = @CallNo,
@body_format = 'html',
@body = @CallComplaint
and if @Status=2
EXEC msdb.dbo.sp_send_dbmail
@recipients = @EmailLineManager,
@profile_name = 'SendEmailCM2',
@subject = @CallNo2,
@body_format = 'html',
@body = @CallComplaint
How to use CASE or If in between.
Please help on this
Thanks
Basit.
basitsar
17-Aug-15 1:21am
View
Thanks A lot dear, other thing what i want in Customercall if Assignto column is null then not execute email code how to do this. and if another column status='Closed' then send email to another persone from User table. Email Column is lineMangerEmail
Below is the example.
If (AssignTo=null) then
exit
end if
if (Status='Closed') then
send email to LineManager column from User table
and execute email
end if
thanks
Basit.
basitsar
19-Jul-15 10:32am
View
many many thanks, Ok then can you please tell me how to clear global variable in java script as my above question
basitsar
16-Jul-15 13:36pm
View
Dear,
Many Many Thanks, Below is the link.
http://www.codeproject.com/Questions/1010323/How-to-Pass-UserName-Password-in-Ajax
basitsar
15-Jul-15 4:12am
View
Dear,
How to add the security in ajax? I already give the user and password to OData Services how to put in Ajax?
Thanks
Basit.
basitsar
13-Jul-15 0:46am
View
Thanks A lot the problem has been solved. But why before not accepting above code?
Thanks
basit.
basitsar
12-Jul-15 5:40am
View
Thanks Alot dear,
Dear, with the debugger with valid user name & password result is below
data = Object {d: Array[1]
Us_Admin: 1
Us_Name: "Basit"
Us_No: 1
Us_Password: "s"
with wrong user & password result is below
data = Object {d: Array[0]
No Data is shwoing
But even with the valid result its not moving in
if (data.d.Us_Admin == 1) {
//redirect
}
else
{
error
}
basitsar
12-Jul-15 5:21am
View
Below is the code.
var _url = "http://localhost:58890/DataService.svc/Mst_User?$filter=Us_Name eq 'Basit' and Us_Password eq 's' &$format=json";
$.ajax({
type: "GET",
url: _url,
timeout: 10000,
async: true,
dataType: "json",
contentType: "application/jsonp; charset=utf-8",
success: function (data) {
if (data.d.Us_Admin == 1) {
//Navigate
} else {
//shows error
}
},
error: function (xhr, status, error) {
// Shows error.
}
});
basitsar
12-Jul-15 5:17am
View
Dear you said check in console. how to do that?
Thanks
Basit.
basitsar
12-Jul-15 4:12am
View
Dear i add a quick watch when i type data.Us_Admin=1 then its shows 1 it goes to success loop but i type wrong user & password.
another when i type data.Us_Admin==1 then it goes to else loop.
basitsar
12-Jul-15 4:10am
View
Deleted
Dear i add a quick watch when i type data.Us_Admin=1 then its shows 1 it goes to success loop but i type wrong user & password.
another when i type data.Us_Admin==1 then it goes to else loop.
basitsar
12-Jul-15 3:38am
View
Many Thanks,
I debug & try three things
data.d.Us_Admin undefined
data.Us_Admin undefined
data.d.__deferred.Us_Admin undefined
all are showing undefined.
basitsar
12-Jul-15 3:04am
View
Below is the o/p of webservices
{"d":[{"__metadata":{"id":"http://localhost:58890/DataService.svc/Mst_User(1)","uri":"http://localhost:58890/DataService.svc/Mst_User(1)","type":"CMModel.Mst_User"},"Trn_CallLog":{"__deferred":{"uri":"http://localhost:58890/DataService.svc/Mst_User(1)/Trn_CallLog"}},"Us_No":1,"Us_Name":"Basit","Us_Password":"s","Us_Admin":1,"Us_Customer":1,"Us_CallAssign":1,"Us_CreateCall":1}]}
basitsar
12-Jul-15 2:44am
View
The Us_Admin is a numeric field, if Us_admin=1 then redirect to another page. I checked in the database its showing also 1, But the code what you suggested is not working with that code showing login failed.
Thanks
Basit
basitsar
12-Jul-15 1:58am
View
showing login failed!
basitsar
1-Jul-15 5:40am
View
Ok thanks understood
basitsar
16-Jun-15 8:07am
View
Dear What i re searched is in one column only taking 255 Characters while import the data from excel to grid view. How to increase that size. please help on this.
basitsar
20-May-15 0:18am
View
Thanks A lot Great.
Thanks
Basit
basitsar
29-Apr-15 4:38am
View
Please tell me how to add handler in my code
Partial Public Class Page1
Inherits PhoneApplicationPage
Public Sub New()
InitializeComponent()
End Sub
Private Sub Button1_Click(sender As System.Object, e As System.Windows.RoutedEventArgs) Handles Button1.Click
Dim abc As New ServiceReference1.WebService1SoapClient
'//how to add handler here
abc.GetUserAsync(TextBox1.Text)
End Sub
Private Sub GetUserCompleted(sender As Object, e As ServiceReference1.GetUserCompletedEventArgs)
'Access e.Results here
TextBox2.Text = e.Result.ToString
End Sub
End Class
basitsar
29-Apr-15 4:16am
View
Many thanks, Please can you tell me more details where should and how to add the handler.
Below is my full page code
Partial Public Class Page1
Inherits PhoneApplicationPage
Public Sub New()
InitializeComponent()
End Sub
Private Sub Button1_Click(sender As System.Object, e As System.Windows.RoutedEventArgs) Handles Button1.Click
Dim abc As New ServiceReference1.WebService1SoapClient
abc.GetUserAsync(TextBox1.Text)
End Sub
Private Sub GetUserCompleted(sender As Object, e As ServiceReference1.GetUserCompletedEventArgs)
'Access e.Results here
End Sub
End Class
basitsar
19-Apr-15 5:22am
View
i deleted global.asax file from ASP.Net web services after that i checked the web service once again working perfectly then also same error.
Thanks
Basit.
basitsar
19-Apr-15 4:24am
View
Thanks dear. But when i removed from Global.asax file (means now no use of global.asax file), i kept in web.config file, the i got the error. Failed to load resource: the server responded with a status of 500 (Internal Server Error)
basitsar
19-Apr-15 3:45am
View
I removed then also same error.
XMLHttpRequest cannot load http://localhost/Iservice/WebService1.asmx/GetUserDetails. The 'Access-Control-Allow-Origin' header contains multiple values '*, *', but only one is allowed. Origin 'http://localhost:52083' is therefore not allowed access.
basitsar
13-Apr-15 0:36am
View
Dear,
Thanks alot. Please see in web.config file in above question. Please tell me where should i change.
Thanks
Basit.
basitsar
13-Apr-15 0:34am
View
Deleted
<configuration>
<system.web>
<compilation debug="true" strict="false" explicit="true" targetframework="4.0">
<httpruntime executiontimeout="9999" maxrequestlength="1000000">
<webservices>
<protocols>
<add name="HttpGet">
<add name="HttpPost">
</protocols>
<appsettings>
<add key="Constr" value="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\Test.mdb;User Id=admin;Password=;">
<add key="CrystalImageCleaner-AutoStart" value="true">
<add key="CrystalImageCleaner-Sleep" value="60000">
<add key="CrystalImageCleaner-Age" value="120000">
<connectionstrings>
<add name="Constr" connectionstring="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\Test.mdb" providername="System.Data.OleDb">
<system.servicemodel>
<servicehostingenvironment aspnetcompatibilityenabled="true">
<system.webserver>
<httpprotocol>
<customheaders>
<add name="Access-Control-Allow-Origin" value="*">
<add name="Access-Control-Allow-Headers" value="Content-Type">
<system.web.extensions>
<scripting>
<webservices>
<jsonserialization maxjsonlength="1024242">
</scripting>
basitsar
13-Apr-15 0:32am
View
Deleted
Web.Config File
<configuration>
<system.web>
<compilation debug="true" strict="false" explicit="true" targetframework="4.0">
<httpruntime executiontimeout="9999" maxrequestlength="1000000">
<webservices>
<protocols>
<add name="HttpGet">
<add name="HttpPost">
</protocols>
<appsettings>
<add key="Constr" value="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\Test.mdb;User Id=admin;Password=;">
<add key="CrystalImageCleaner-AutoStart" value="true">
<add key="CrystalImageCleaner-Sleep" value="60000">
<add key="CrystalImageCleaner-Age" value="120000">
<connectionstrings>
<add name="Constr" connectionstring="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\Test.mdb" providername="System.Data.OleDb">
<system.servicemodel>
<servicehostingenvironment aspnetcompatibilityenabled="true">
<system.webserver>
<httpprotocol>
<customheaders>
<add name="Access-Control-Allow-Origin" value="*">
<add name="Access-Control-Allow-Headers" value="Content-Type">
<system.web.extensions>
<scripting>
<webservices>
<jsonserialization maxjsonlength="1024242">
</scripting>
basitsar
15-Mar-15 3:15am
View
Dear,
I already save a path in database D:abc.jpg.
How i save through upload control. and save image in D:abc.jpg in server itself.
When going to retrieve it goes to server and then retrieve not in local.
thanks
Basit.
basitsar
13-Jan-15 3:37am
View
Thanks Kornfeld. But this solution is not work in google chrome. IE and Firefox is Ok.
thanks
Basit.
basitsar
26-Aug-14 1:32am
View
Thanks David,Not installed. But we cannot add the reference. Becoz for exporting to excel purpose i used. If not then what is the alternate solution.
Thanks
Basit.
basitsar
21-Aug-14 2:54am
View
Other wise in SQL it is possible to create a schedule. on that schedule check the table if there is any expiry date the fire email??
basitsar
20-Aug-14 8:24am
View
Great Vinay.
Thanks
Basit.
basitsar
17-Jul-12 2:37am
View
Dear Mohammed,
We don't have internet in steady state, what the article is in SQL server 2008 there is replica of database on other server. what i need is my database is on local machine how to sync with the server database?
basitsar
16-Jun-12 7:48am
View
Dear Sandeep,
Thanks for your prompt reply. I created a template field where you can edit a data in a multiple rows without click on edit button there is no boundfield then how retrieve from database?
Thanks
Basit.
basitsar
12-Jun-12 4:24am
View
Binu thanks, but i want this watermark on combo/dropdown list change event. Suppose i select in the dropdown employee search then in textbox i want to show enter emloyee search.
Thanks
Basit.
Show More