16,004,653 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 .NET 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 SujataJK (Top 133 by date)
SujataJK
19-Dec-18 8:04am
View
Thanks @MadMyche
Actually in my case seen is that i have to compare report data between 2 date
like 1) Select Actual,Budget from table where dt between dt1 and dt2
--This is my A
And 2) Select Actual,Budget from table where dt between dt1 and dt2
-- This is my B
Now requirement is like - to compare this 2 dataset (A & B)
And calculate variace in amount between (A's Actual - B' Actual) and also calculate variance in Percentage
eg
A Buget A_Actual B_Actual Variance
100 120 100 20
150 100 150 -50
SujataJK
31-Oct-18 4:46am
View
Please help me.
SujataJK
26-Oct-18 0:40am
View
thanks @Zameer Hussain.
But Here i want Time Picker to fill timesheet in my application.So i want timepicker of interval 15 or 30 minutes.
SujataJK
24-Oct-18 3:20am
View
Here i have changed DefaultApplicationPool Identity from NetworkService To LocalSystem
SujataJK
24-Oct-18 2:32am
View
Finally i resolve my issue.
SujataJK
24-Oct-18 1:12am
View
I got mail including this warning message
http://localhost/JKWorkBewnch/frmLogin.aspx
Source:
System.WebMessage:
Exception of type 'System.Web.HttpUnhandledException' was thrown.Stack Trace:
at System.Web.UI.Page.HandleError(Exception e)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at ASP.frmlogin_aspx.ProcessRequest(HttpContext context) in c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\jkworkbewnch\673b1ad7\11d2590e\App_Web_ykh4oa1j.2.cs:line 0
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step)
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
Refresh Refresh
Compose Compose
Print
Move selected item(s) to Trash
SujataJK
23-Oct-18 6:29am
View
I did this in global.aspx
void Application_Error(object sender, EventArgs e)
{
// Code that runs when an unhandled error occurs
MailMessage msg = new MailMessage();
HttpContext ctx = HttpContext.Current;
msg.To.Add(new MailAddress("sujata.shinde@jkumar.com"));
msg.From = new MailAddress("sujata.shinde@jkumar.com");
msg.Subject = "My app had an issue...";
msg.Priority = MailPriority.High;
StringBuilder sb = new StringBuilder();
sb.Append(ctx.Request.Url.ToString() + System.Environment.NewLine);
sb.Append("Source:" + System.Environment.NewLine + ctx.Server.GetLastError().Source.ToString());
sb.Append("Message:" + System.Environment.NewLine + ctx.Server.GetLastError().Message.ToString());
sb.Append("Stack Trace:" + System.Environment.NewLine + ctx.Server.GetLastError().StackTrace.ToString());
msg.Body = sb.ToString();
Response.Write(sb.ToString());
// msg.Body = sb.ToString();
//CONFIGURE SMTP OBJECT
System.Net.Mail.SmtpClient smtCliend = new System.Net.Mail.SmtpClient();
smtCliend.Host = "smtp.logix.in"; //Or Your SMTP Server Address
smtCliend.Port = 587;
smtCliend.UseDefaultCredentials = false;
smtCliend.Credentials = new NetworkCredential("sujata.shinde@jkumar.com", "S@ujata321");
//SEND EMAIL
smtCliend.Send(msg);
}
SujataJK
23-Oct-18 4:38am
View
Above error message also shows following details
Most likely causes:
1. No authentication protocol (including anonymous) is selected in IIS.
2 Only integrated authentication is enabled, and a client browser was used
that does not support integrated authentication.
3 .Integrated authentication is enabled and the request was sent through a proxy that changed the authentication headers before they reach the Web server.
4. The Web server is not configured for anonymous access and a required authorization header was not received.
5. The "configuration/system.webServer/authorization" configuration section may be explicitly denying the user access.
SujataJK
23-Oct-18 4:36am
View
in iis ,inside authorization rules section i allow all user and entry type is local
SujataJK
23-Oct-18 4:26am
View
Forms Authentication
SujataJK
19-May-18 6:42am
View
Thanks Sir,
I solved this by re-install of visual studio.
SujataJK
18-May-18 5:55am
View
after deleting pdb file or cleaning solution it also doesn't work.
SujataJK
18-May-18 0:40am
View
Inside release, there also doesn't exist .exe and .msi files.
and one more thing that i had observed that when i am going to build setup then it doesn't show build successed messsge,instead of that my solution exlore windows with visual studio restart automatically
SujataJK
17-Apr-18 1:43am
View
tHIS IS WHAT I HAVE TRIED NOW
SELECT DOC_ID,DOC_DT,QTY,
CASE WHEN QTY > 0 THEN QTY
ELSE '' END AS RECEIPT,
CASE WHEN QTY < 0 THEN QTY
ELSE '' END AS ISSUE
FROM tbl_StockMaster
AND OUTPUT OF THIS SOMETHING LIKE THIS
DOC_ID DOC_DT QTY RECEIPT ISSUE
MRNGD/0001/18-19 2018-04-17 10:22:12.000 24 24 0
MRNGD/0001/18-19 2018-04-17 10:22:12.000 38 38 0
MRNGD/0001/18-19 2018-04-17 10:22:12.000 45 45 0
MRNGD/0002/18-19 2018-04-17 10:23:58.000 25 25 0
MRNGD/0002/18-19 2018-04-17 10:23:58.000 35 35 0
MRNGD/0002/18-19 2018-04-17 10:23:58.000 25 25 0
MRNGD/0003/18-19 2018-04-17 10:25:07.000 50 50 0
MRNGD/0003/18-19 2018-04-17 10:25:07.000 25 25 0
MRNGD/0003/18-19 2018-04-17 10:25:07.000 33 33 0
PRDGD/0001/18-19 2018-04-17 10:26:51.000 45 45 0
PRDGD/0001/18-19 2018-04-17 10:26:51.000 -24 0 -24
PRDGD/0001/18-19 2018-04-17 10:26:51.000 -21 0 -21
PRDGD/0001/18-19 2018-04-17 10:26:51.000 21 21 0
PRDGD/0002/18-19 2018-04-17 10:36:50.000 35 35 0
PRDGD/0002/18-19 2018-04-17 10:36:50.000 -35 0 -35
TRNGD/0001/18-19 2018-04-17 00:00:00.000 -45 0 -45
NOW I WANT ANOTHER COLUMN AFTER ISSUE COLUMN i.e BALANCE(STOCK) COLUMN WHICH SOMETHING LIKE THIS
DOC_ID DOC_DT QTY RECEIPT ISSUE BALANCE
MRNGD/0001/18-19 2018-04-17 24 24 0 24.00
MRNGD/0001/18-19 2018-04-17 38 38 0 62.00
MRNGD/0001/18-19 2018-04-17 45 45 0 107.00
MRNGD/0002/18-19 2018-04-17 25 25 0 132.00
MRNGD/0002/18-19 2018-04-17 35 35 0 167.00
MRNGD/0002/18-19 2018-04-17 25 25 0 192.00
MRNGD/0003/18-19 2018-04-17 50 50 0 245.00
MRNGD/0003/18-19 2018-04-17 25 25 0 270.00
MRNGD/0003/18-19 2018-04-17 33 33 0 303.00
PRDGD/0001/18-19 2018-04-17 45 45 0 348.00
PRDGD/0001/18-19 2018-04-17 -24 0 -24 324.00
PRDGD/0001/18-19 2018-04-17 -21 0 -21 303.00
PRDGD/0001/18-19 2018-04-17 21 21 0 324.00
PRDGD/0002/18-19 2018-04-17 35 35 0 359.00
PRDGD/0002/18-19 2018-04-17 -35 0 -35 324.00
TRNGD/0001/18-19 2018-04-17 -45 0 -45 279.00
Please quide me
SujataJK
31-Mar-18 4:16am
View
one more thing when i insert null values for var binary field then its works fine
i.e
string qry = "insert into tblComplaintMaster values('" + complNo + "','" + finyr + "',Convert(Date,'" + complDt + "'),'" + complNature + "','" + product + "','" + srno + "'," + issueid + ",'" + descr + "','" + assignto + "','" + reqBy + "','" + contact + "','" + email + "','" + loc + "','" + priority + "','" + txtStatus.Text + "','" + fromTime + "','" + toTime + "',null,null,null,null,null)";
cmd = new SqlCommand(qry);
con.Open();
cmd.Connection = con;
int result = cmd.ExecuteNonQuery();
Response.Write("Result=" + result);
Then gives result=1 as output that means values inserted to database sucessfully
SujataJK
30-Mar-18 6:55am
View
@john Simmons
In my application when i am checking whether file is attached or not using this
if (callReportFileUpload.HasFile)
{
Response.Write("has file");
}
and to checking data in bytes array using Response.Write as follows
string filename = Path.GetFileName(callReportFileUpload.PostedFile.FileName);
Stream str = callReportFileUpload.PostedFile.InputStream;
BinaryReader br = new BinaryReader(str);
Byte[] bytes = br.ReadBytes((int)str.Length);
Response.Write(bytes.Length);
and your 3 rd point record being inserted or not ? I am checking this is using
int result = cmd.ExecuteNonQuery();
Response.Write("Result=" + result);
Then it doesn't gives any result either 0 or 1.
Ant your 4th point it doesn't gives any exception also
SujataJK
30-Mar-18 1:38am
View
yes,just i add this line in y application but it doesn't show any output.
SujataJK
30-Mar-18 1:24am
View
Response.Write("Result=" + result); it doesn't show any output.I am not understand where is the problem.
SujataJK
21-Mar-18 5:42am
View
yes you are right.I got my mistake thanks a lot.
SujataJK
21-Mar-18 5:07am
View
no .
datatype of fromTime and totime is Time
SujataJK
21-Mar-18 5:01am
View
In my table this is record set
Id complNo complDate complNature assignto priorit status fromtime totime
1. B0001/17-18 2018-03-1 Bugs HEMANT High Active 12:15 02:15
2. B0001/17-18 2018-03-21 Bugs HEMANT High Active 12:15 01:15
According to my query result will be
2. B0001/17-18 2018-03-21 Bugs HEMANT High Active 12:15 01:15
but it does not show any record.
SujataJK
8-Jan-18 3:21am
View
I solved above issue using
ClientScript.RegisterStartupScript(GetType(), "closePage", "<script type=\"text/JavaScript\">window.opener.location.href='RedirectAnotherPage.aspx'; window.close();");
SujataJK
4-Jan-18 1:07am
View
THANKS Sir.
SujataJK
29-Dec-17 0:29am
View
what is use of this https://plnkr.co/edit/?p=catalogue link?
SujataJK
28-Dec-17 23:37pm
View
when i replace above code then also it gives same error - JavaScript runtime error: Object doesn't support property or method 'getElementsByClassName' AT
var lbl = selectedRow.getElementsByClassName('clsRemarksGrid')[0]
SujataJK
28-Dec-17 7:43am
View
This is my code for that
<asp:TemplateField HeaderText="">
<itemtemplate>
<asp:LinkButton ID="lnkRemark" Text="Add Remark" OnClientClick="showpopup(this); return false" runat="server">
SujataJK
28-Dec-17 1:41am
View
in google chrome popup window disappears within second so i am not able to test
SujataJK
28-Dec-17 1:13am
View
is there any problem because of internet explorer version?
SujataJK
28-Dec-17 0:25am
View
<asp:GridView runat="server" ID="gridView1" DataKeyNames="ENTRYNO"
AutoGenerateColumns="false">
<columns>
<asp:BoundField DataField="ENTRYNO" HeaderText="ENTRYNO" />
<asp:TemplateField HeaderText="A">
<itemtemplate>
<asp:CheckBox ID="ChkApproved" runat="server">
<asp:TemplateField HeaderText="Remarks">
<itemtemplate>
<asp:Label ID="lblRemarksGrid" CssClass="clsRemarksGrid" runat="server" Text="" Width="200Px">
<asp:TemplateField HeaderText="">
<itemtemplate>
<asp:LinkButton ID="lnkRemark" Text="Add Remark" OnClientClick="showpopup(this); return false" runat="server">
SujataJK
27-Dec-17 23:48pm
View
if (!Page.IsPostBack)
{
DataTable dt = new DataTable();
dt.Columns.Add("ENTRYNO");
for (int i = 0; i < 5; i++)
dt.Rows.Add(i);
gridView1.DataSource = dt;
gridView1.DataBind();
}
SujataJK
27-Dec-17 23:46pm
View
Check this,
var selectedRow = undefined;
function showpopup(obj) {
var modal = document.getElementById('myModal');
modal.style.display = "block";
selectedRow = obj.parentElement.parentElement;
if (selectedRow) {
var lbl = selectedRow.getElementsByClassName('clsRemarksGrid')[0]
var value = lbl.toString;
document.getElementById('txtRemarks').value = value;
}
}
function closepopup() {
var modal = document.getElementById('myModal');
modal.style.display = "none";
}
function okpopup() {
debugger
var modal = document.getElementById('myModal');
modal.style.display = "none";
if (selectedRow) {
var lbl = selectedRow.getElementsByClassName('clsRemarksGrid')[0]
var value = document.getElementById('txtRemarks').value;
lbl.textContent = value;
}
}
/* The Modal (background) */
.modal {
display: none; /* Hidden by default */
position: fixed; /* Stay in place */
z-index: 1; /* Sit on top */
padding-top: 100px; /* Location of the box */
left: 0;
top: 0;
width: 100%; /* Full width */
height: 100%; /* Full height */
overflow: auto; /* Enable scroll if needed */
background-color: rgb(0,0,0); /* Fallback color */
background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
}
/* Modal Content */
.modal-content {
position: relative;
background-color: #fefefe;
margin: auto;
padding: 0;
border: 1px solid #888;
width: 400px;
box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2),0 6px 20px 0 rgba(0,0,0,0.19);
-webkit-animation-name: animatetop;
-webkit-animation-duration: 0.4s;
animation-name: animatetop;
animation-duration: 0.4s;
}
/* Add Animation */
@-webkit-keyframes animatetop {
from {
top: -300px;
opacity: 0;
}
to {
top: 0;
opacity: 1;
}
}
@keyframes animatetop {
from {
top: -300px;
opacity: 0;
}
to {
top: 0;
opacity: 1;
}
}
/* The Close Button */
.close {
color: white;
float: right;
font-size: 28px;
font-weight: bold;
}
.close:hover,
.close:focus {
color: #000;
text-decoration: none;
cursor: pointer;
}
.modal-header {
padding: 5px;
background-color: #5cb85c;
color: white;
}
.modal-body {
padding: 5px;
height: 100px;
}
.modal-footer {
padding: 2px 16px;
background-color: #5cb85c;
color: white;
}
<asp:GridView runat="server" ID="gridView1" DataKeyNames="ENTRYNO"
AutoGenerateColumns="false">
<columns>
<asp:BoundField DataField="ENTRYNO" HeaderText="ENTRYNO" />
<asp:TemplateField HeaderText="A">
<itemtemplate>
<asp:CheckBox ID="ChkApproved" runat="server">
<asp:TemplateField HeaderText="Remarks">
<itemtemplate>
<itemt
SujataJK
27-Dec-17 23:35pm
View
Again it gives same exception - JavaScript runtime error: Object doesn't support property or method 'getElementsByClassName' AT
var lbl = selectedRow.getElementsByClassName('clsRemarksGrid')[0]
SujataJK
27-Dec-17 7:03am
View
yes.when i type selectedRow. then it doesnot show such method ;i.e getElementByclassName()
SujataJK
27-Dec-17 6:59am
View
@karthik
I have tried your solution but shows me this error
JavaScript runtime error: Object doesn't support property or method 'getElementsByClassName' at
var lbl = selectedRow.getElementsByClassName('clsRemarksGrid')[0]
SujataJK
27-Dec-17 5:26am
View
Thanks.
Please Share realated link or code
SujataJK
21-Dec-17 7:28am
View
thanks all.
I solved the problem.In above case i just forgot to set autopostback="true" property of checkbox.
SujataJK
19-Dec-17 4:19am
View
i tried using session instead of viewstate but problem remains same.
SujataJK
18-Dec-17 3:48am
View
see the following javascript code for count(selected entries)
function SelectAllCheckboxes(chk) {
$('#<%=gvAppvrDetail.ClientID %>').find("input:checkbox").each(function () {
if (this != chk) {
this.checked = chk.checked;
}
});
CheckBoxCount1();
}
function CheckBoxCount1() {
var gv = document.getElementById("<%= gvAppvrDetail.ClientID %>");
var inputList = gv.getElementsByTagName("input");
var numChecked = -1;
for (var i = 0; i < inputList.length; i++) {
if (inputList[i].type == "checkbox" && inputList[i].checked) {
numChecked = numChecked + 1;
}
}
var label = document.getElementById("<%=lblcntRows.ClientID %>");
label.innerHTML = numChecked;
document.getElementById("<%=lblcntRows.ClientID %>").value = label.innerHTML;
}
function CheckBoxCount() {
var gv = document.getElementById("<%= gvAppvrDetail.ClientID %>");
var inputList = gv.getElementsByTagName("input");
var numChecked = 0;
for (var i = 0; i < inputList.length; i++) {
if (inputList[i].type == "checkbox" && inputList[i].checked) {
numChecked = numChecked + 1;
}
}
var label = document.getElementById("<%=lblcntRows.ClientID %>");
label.innerHTML = numChecked;
document.getElementById("<%=lblcntRows.ClientID %>").value = label.innerHTML;
}
SujataJK
4-Nov-17 1:23am
View
thanks a lot @Peter_in_2780.
It solve my problem.
SujataJK
27-Oct-17 8:47am
View
Its ajax control
SujataJK
27-Oct-17 8:36am
View
as per my knowledge ajax combobox allows user autocomplete textbox using AutoCompleteMode="SuggestAppend" property
SujataJK
27-Oct-17 8:17am
View
actually i am new to this concept.i have not added any user control.Please guide me how to use this.
SujataJK
27-Oct-17 8:13am
View
No
SujataJK
27-Oct-17 7:59am
View
In my code combobox is bind in page_load().
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
LoadLocationList();
}
}
private void LoadLocationList()
{
SqlConnection con = null;
SqlCommand cmd = null; ;
SqlDataReader dr;
try
{
con = new SqlConnection(ConfigurationManager.ConnectionStrings["CRMConnection"].ConnectionString);
cmd = new SqlCommand("select locationname from dbo.tbl_LocationMaster");
con.Open();
cmd.Connection = con;
SqlDataAdapter ad = new SqlDataAdapter(cmd);
DataSet ds = new DataSet();
ad.Fill(ds);
//dr = cmd.ExecuteReader();
if (ds.Tables[0].Rows.Count > 0)
{
cmbLocationList.DataSource = ds;
cmbLocationList.DataBind();
cmbLocationList.DataTextField = "locationname";
cmbLocationList.DataValueField = "locationname";
cmbLocationList.DataBind();
cmbLocationList.Items.Insert(0, new ListItem(" ", ""));
}
else
{
ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "Message", "alert('No Data Found')", true);
}
}
catch (Exception ex)
{
ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "Message", "alert('" + ex.Message + "')", true);
}
finally
{
cmd.Dispose();
con.Close();
}
}
SujataJK
3-Oct-17 5:26am
View
but how can encode these values?
SujataJK
3-Oct-17 5:25am
View
yes its working
SujataJK
3-Oct-17 2:52am
View
it means when i am going click on ActiveBugs hyperlink then it will be type=="Bugs" and status="Active".Like that i have several hyperlink as follwoing
1.ActiveBugs here type="Bugs" and status="Active"
2.ResolevdBugs here type="Bugs" and status="Closed"
3.ActiveRequirement here type="Requirement" and status="Active"
4.ResolevdRequirement here type="Requirement" and status="Closed".
SujataJK
3-Oct-17 1:56am
View
I had also tried like this(using Hiddenfield)
<asp:HiddenField ID="hdtype" Value="Bugs" runat="server" />
<asp:HiddenField ID="hdstattus" Value="Active" runat="server" />
<asp:HyperLink id="hyperlink2"
NavigateUrl='<%# string.Format("~/frmCompliantView.aspx?&type={0}&status={1}",Eval("hdtype"),Eval("hdstattus")) %>'
Text="Active Bugs" runat="server"/>
but it's not working.
SujataJK
22-Aug-17 7:12am
View
Ok
SujataJK
22-Aug-17 4:32am
View
Thanks @Thomas
But here i have vertical menu bar(created using ajax) that i want to show in left hand side of each page .
SujataJK
17-Jul-17 1:05am
View
Yes when i did that
select @cols = STUFF((SELECT distinct ',' + QUOTENAME(STATENAME)
from (
(select CODE from FARVISIONDB..M_STATEWISEGSTINACTAG) e inner join
(select CODE,STATENAME from FARVISIONDB..M_STATEMASTER) f on e.code=f.code
)
FOR XML PATH(''), TYPE).value('.', 'NVARCHAR(MAX)') ,1,1,'')
print @cols;
i am not able to write @dbnm(Variable) instead of FARVISIONDB .
SujataJK
17-Jul-17 1:00am
View
yes Richard u are correct
SujataJK
13-Jul-17 5:27am
View
I also tried this it gives mi same error.
For further clearance Please check my stored procedure..
create procedure [dbo].[GSTIN_Update]
AS
BEGIN
DECLARE @cols AS NVARCHAR(MAX),
@query AS NVARCHAR(MAX)
select @cols = STUFF((SELECT distinct ',' + QUOTENAME(STATENAME)
from (
(select CODE from FARVISIONDB..M_STATEWISEGSTINACTAG) e inner join
(select CODE,STATENAME from FARVISIONDB..M_STATEMASTER) f on e.code=f.code
)
FOR XML PATH(''), TYPE).value('.', 'NVARCHAR(MAX)') ,1,1,'')
print @cols;
set @query = 'SELECT CtrlAc, DESCR,' + @cols + ' from
(select c.CtrlAc,a.DESCR,s.GSTIN,stcd.statename from
(select accd,descr,MAINACCD from FARVISIONDB..M_LEDGER) as a inner join
(select code,Gstin,accd from FARVISIONDB..M_STATEWISEGSTINACTAG) as s on a.ACCD = s.ACCD inner join
(SELECT CODE,STATENAME,UT FROM FARVISIONDB..M_STATEMASTER) as STCD on s.CODE=stcd.CODE INNER JOIN
(SELECT ACCD,DESCR AS CtrlAc from FARVISIONDB..M_LEDGER) as C on c.ACCD=a.MAINACCD
) x
pivot
(
MAX(GSTIN)
for statename in (' + @cols + ')
) p '
execute(@query)
PRINT @query;
END;
This is MY static procedure i just want replace FARVISIONDB by @dbnm parametere.
here @Cols contains state name which i have used in @query.
i.e @Cols contains
[BIHAR],[DADRA AND NAGAR HAVELI],[DAMAN & DIU],[DELHI],[GOA],[GUJARAT],[HARYANA],[JHARKHAND],[KARNATAKA],[MADHYA PRADESH],[MAHARASHTRA],[RAJASTHAN],[TAMILNADU],[TELANGANA],[UTTAR PRADESH]
SujataJK
13-Jul-17 5:18am
View
yes i had tried .Is working when i provide manual database name
SujataJK
13-Jul-17 4:46am
View
no.I mean in 1 st query .I have print command so its results my second query which i shown above.That means my query executed up to print statement but when i am going to execute @cols then it shows error like
Msg 156, Level 15, State 1, Line 6
Incorrect syntax near the keyword 'FOR'.
SujataJK
7-Jul-17 7:28am
View
yes
SujataJK
7-Jul-17 7:10am
View
I could not use a separate query like you above shown.Here i have dropdownlist with values Pending ,Certified, All .Where My table has WDNO column with NULL means PENDING AND Some value like 'WDNLAK/00008/17-18' means CERITIFIED .
When i choose All option from dropdownlist then result contain pending records + certified records.For that purpose i have use Case statement in above my query.
SujataJK
7-Jul-17 7:01am
View
thanks @RickZeeland but @status='' here '' it used for pending + certified value.
i.e it should display both pending and certified values.
SujataJK
5-Jul-17 6:08am
View
thanks..
SujataJK
5-Jul-17 6:08am
View
Done..
SujataJK
5-Jul-17 0:37am
View
when i added existing report respectively original in report header and duplicate added in page header.Then it works perfect but when i am going to add triplicate report then it not works.I am now confused ,where to add sub report in section.
SujataJK
4-Jul-17 8:44am
View
yes. i have added one subreport in report header and one added in page header section .Am i Correct?
SujataJK
4-Jul-17 7:47am
View
you mean i have to design separate copy for original,duplicate and triplicate and all those sub report in original report.
SujataJK
4-Jul-17 7:24am
View
OK
SujataJK
4-Jul-17 6:32am
View
yes i am using store procedure to show invoice details.
SujataJK
12-May-17 8:23am
View
then what operation will be performed on logout link click?
SujataJK
5-May-17 7:41am
View
Ok.
SujataJK
5-May-17 6:49am
View
you mean like this
var nodes = (xmlDoc.GetElementsByTagName("UserName")[0]);
SujataJK
5-May-17 4:58am
View
Error 1 'System.Xml.XmlNode' does not contain a definition for 'GetElementsByTagName' and no extension method 'GetElementsByTagName' accepting a first argument of type 'System.Xml.XmlNode' could be found (are you missing a using directive or an assembly reference?) D:\SujataShare\JKViasion17042017\JKVision\JKVision\Site.Master.cs 65 68 JKVision
SujataJK
5-May-17 2:31am
View
Now it shows error at
var nodes = (xmlDoc.GetElementsByTagName("Rights")[0]).GetElementsByTagName("Right");
SujataJK
4-May-17 7:16am
View
i can't understand what you are asking.
SujataJK
4-May-17 0:50am
View
thanks @Wessel
but following line shows errors
//i think deceleration error in var userlist
var userList = new list(of string, string)
var nodes = (xmlDoc.GetElementsByTagName("Rights")[0]).GetElementsByTagName("Right");
SujataJK
3-May-17 6:46am
View
Somebody please help me...
SujataJK
7-Apr-17 2:24am
View
hey i solve my issue just little change in above code i.e
List<listitem> files = new List<listitem>();
f (!this.IsPostBack)
{
string[] filePaths = Directory.GetFiles(Server.MapPath("~/Files/"));
foreach (string filePath in filePaths)
{
files.Add(new ListItem(Path.GetFileName(filePath), filePath));
}
}
it works for me
SujataJK
5-Apr-17 4:51am
View
i just use
response.write("alert('"+file.FullName+"')")
SujataJK
5-Apr-17 4:38am
View
i tried but not working for me
when print file.FullName in looks like
D:SujataWebApplicationZipFileDemoZipFileDemoDownloadLibraryPBLWRM0000116-17.pdf
instead of
D:\Sujata\WebApplication\ZipFileDemo\ZipFileDemo\DownloadLibrary\PBLWRM0000116-17.pdf
SujataJK
5-Apr-17 4:23am
View
yes yes u are correct.I will check your above solution
SujataJK
5-Apr-17 3:03am
View
Thanks @Karthik
but iterate foreach like this
DirectoryInfo dir = new DirectoryInfo(@"D:/PDFFiles/");
FileInfo[] files = dir.GetFiles();
foreach (FileInfo file in files)
{
string fileName = Path.GetFileName(file.ToString());
ListItem item = new ListItem(fileName);
cblFiles.Items.Add(item);
}
Here files is FileInfo[] type array ND I have added directory files to files .So i have path na
SujataJK
31-Mar-17 1:32am
View
thanks @Richard
SujataJK
25-Feb-17 7:25am
View
is there any other way
SujataJK
25-Feb-17 7:24am
View
ok.I in my task i have to provide folder selection for user where user can download all files
SujataJK
25-Feb-17 7:12am
View
but file upload does not provide folder selection functionality.We can just select file i want folder selection.
SujataJK
25-Feb-17 6:58am
View
exactly.. but how to do that?
SujataJK
25-Feb-17 6:35am
View
thanks sir for reply
but In my web application user has browse and download Button when it click on browse button then it requires folder selection for download all files in same folder.
SujataJK
22-Feb-17 5:35am
View
PrincipalContext ctx = new PrincipalContext(ContextType.Domain);
// define a "query-by-example" principal - here, we search for all users
UserPrincipal qbeUser = new UserPrincipal(ctx);
// create your principal searcher passing in the QBE principal
PrincipalSearcher srch = new PrincipalSearcher(qbeUser);
// find all matches
foreach (var found in srch.FindAll())
{
//Label1.Text = found.Name;
// do whatever here - "found" is of type "Principal" - it could be user, group, computer.....
DropDownList1.Items.Add(found.Name);
DropDownList2.Items.Add(found.UserPrincipalName);
}
SujataJK
22-Feb-17 4:43am
View
i got solution...
SujataJK
9-Feb-17 23:46pm
View
Ye..i got solution
SujataJK
8-Feb-17 0:36am
View
Please give mi solution for above post..
SujataJK
2-Feb-17 7:47am
View
Thanks Karthik sir,
I got solution .
Follwoing code downloads multiple files from database and save on disc.It works perfectly in my case.
using (SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["MyConnection"].ConnectionString))
{
// DialogResult result = this.folderBrowserDialog1.ShowDialog();
con.Open();
using (SqlCommand cmd = new SqlCommand("select Name, ContentType, Data from ImageTable"))
{
cmd.Connection = con;
DataTable objTable = new DataTable();
SqlDataAdapter objAdapter = new SqlDataAdapter(cmd);
// objAdapter.MissingSchemaAction = MissingSchemaAction.AddWithKey;
SqlCommandBuilder sqlCmdBuilder = new SqlCommandBuilder(objAdapter);
objAdapter.Fill(objTable);
foreach (DataRow objRow in objTable.Rows)
{
byte[] objData = (byte[])objRow["Data"];
var firstNBytes = objData.Take(4);
Byte[] threeBytes = new Byte[] { objData[0], objData[1], objData[2], objData[3] };
var bytesToCompare = Encoding.Unicode.GetBytes("0x25");
bool equal = firstNBytes.SequenceEqual(bytesToCompare);
string hex = BitConverter.ToString(threeBytes);
hex.Replace("-", "");
string strFileToSave = "D:\\PDFFiles\\" + Guid.NewGuid();
if (hex == "25-50-44-46")
{
strFileToSave += ".pdf";
}
else
{
strFileToSave += ".jpg";
}
FileStream objFileStream = new FileStream(strFileToSave, FileMode.Create, FileAccess.Write);
objFileStream.Write(objData, 0, objData.Length);
objFileStream.Close();
}
}
}
SujataJK
2-Feb-17 4:43am
View
Ok..
i will try
SujataJK
2-Feb-17 4:05am
View
Following code i used for download PDF when download linkButton of gridview click.
i.e by passing particular id
protected void lnkDownload_Click(object sender, EventArgs e)
{
LinkButton lnkbtn = sender as LinkButton;
GridViewRow gvrow = lnkbtn.NamingContainer as GridViewRow;
int fileid = Convert.ToInt32(gvDetails.DataKeys[gvrow.RowIndex].Value.ToString());
using (SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["MyConnection"].ConnectionString))
{
using (SqlCommand cmd = new SqlCommand())
{
cmd.CommandText = "select Name, ContentType, Data from ImageTable where id=@Id";
cmd.Parameters.AddWithValue("@Id", fileid);
cmd.Connection = con;
con.Open();
SqlDataReader dr = cmd.ExecuteReader();
if (dr.Read())
{
Response.ContentType = dr["ContentType"].ToString();
Response.AddHeader("Content-Disposition", "attachment;filename=\"" + dr["Name"] + "\"");
Response.BinaryWrite((byte[])dr["Data"]);
Response.End();
byteArray = (byte[])dr["Data"];
string result = System.Text.Encoding.UTF8.GetString(byteArray);
list.Add(result);
}
}
}
SujataJK
2-Feb-17 4:02am
View
ok..
but how can do that? as per ur above link..
string sPathToSaveFileTo = @"C:\SelectedFile.pdf";
// on this path i will create selected PDF File Data open pdf for checking
this only for selected file but i want to perform download action on btnDownloadAll_Click().i.e.Download all file in single select query.
SujataJK
2-Feb-17 3:38am
View
thanks,Karthik sir.
As per understanding above link save individual pdf to the disc.but i want simultaneously download or create zip folder of all pdf stoared in database
SujataJK
5-Jan-17 6:52am
View
yeeeh,
I solved the problem
here i replace <asp:hyperlink> by <asp:linkbutton>
as follows
<asp:LinkButton ID="LinkButton1" onclick="LinkButton1_Click" runat="server">Logout
and c# function as
protected void LinkButton1_Click(object sender, EventArgs e)
{
string unm = this.Context.Request.LogonUserIdentity.Name;
string clientMachineName;
clientMachineName = (Dns.GetHostEntry(Request.ServerVariables["remote_addr"]).HostName);
string ip = (Request.ServerVariables["HTTP_X_FORWARDED_FOR"] ??
Request.ServerVariables["REMOTE_ADDR"]).Split(',')[0].Trim();
string lmdt = DateTime.Now.ToString();
LogActivity log = new LogActivity();
log.CreateLogFile(unm, clientMachineName, ip, lmdt, "Log-out");
ScriptManager.RegisterStartupScript(this.Page, Page.GetType(), "text", "Logout()", true);
}
and same javascript:Logout() function
SujataJK
5-Jan-17 5:46am
View
problem is that how can i call both java-script function and c# function on same <asp:hyperlink> control.
here java-script function for logout i.e for window.close and c# function for save logout detail.
SujataJK
16-Dec-16 6:53am
View
yeehh,
I solved problem.
thanks @Richard and F-ES Sitecore
SujataJK
16-Dec-16 5:34am
View
@Richard
sir i did that like,
cmd.Parameters.Add("@Data", SqlDbType.VarBinary,8000).Value=bytes;
but still its not working
SujataJK
16-Dec-16 5:26am
View
but sir,
in my case varbinary(MAX) working for some pdf file like
New Doc 10.pdf - application/pdf
Formwork Checklist.pdf - application/pdf
RFI.pdf - application/pdf
PBILLJG0050715-16.pdf - application/pdf
PBILLJG0051315-16.pdf - application/pdf
and for some pdf file its not working.
Is there any version issue?
SujataJK
16-Dec-16 4:57am
View
thanks Richard.
but i can not find BLOB datatype in sql server 2008 R2
SujataJK
16-Dec-16 4:28am
View
thanks for quick reply.
Here i have 4 columns for my ImageTable as
id int not nill,
Name varchar(25)null,
ContentType varchar(25)null,
and
Data varBinary(MAX)
SujataJK
14-Jan-16 0:08am
View
Still I haven't solve this issue.Please help me
SujataJK
11-Jan-16 5:35am
View
I am New to MVC concept thats why have begun from MVC2 .If i start directly from higher version then i never understand drowbacks of MVC2.I will do Some practice on MVC2 then i will move to higher version.
thanks for your advise.
As per your solution I did that but it gives another error like that...
foreach statement cannot operate on variables of type 'MvcCRUDApplication.Models.CRUDModel' because 'MvcCRUDApplication.Models.CRUDModel' does not contain a public definition for 'GetEnumerator'
SujataJK
8-Jan-16 7:01am
View
Thanks Sinisa .
I solved my problem when i put my Index View under Views/Shared Folder.
thanks again for your early response.
SujataJK
8-Jan-16 6:57am
View
No my Index is as Views/Index.aspx .
SujataJK
31-Dec-15 5:23am
View
@Richard
I used debugger and also rewrite code then also same issue.
Also I used smtp.rediffmail.com in separate program still same issue.
SujataJK
31-Dec-15 0:41am
View
thanks for your early reply
SujataJK
31-Dec-15 0:39am
View
already changed still not working i gives following exception
InvalidOperationException ....The SMTP Host is not specified
SujataJK
24-Dec-15 0:32am
View
how to use web service within my web application for such task?
SujataJK
18-Dec-15 5:30am
View
I want GrandTotal at Maximum of SRNO
SujataJK
18-Dec-15 5:25am
View
Thanks,
It's Still fine than my output.But now i want how to put GrandTotal Row at Bottom.
SujataJK
18-Dec-15 4:25am
View
Here I have used with rollup for calculating sum of perticular column at bottom ,I got result but grand total row should be at bottom of query result Instead my result it display at top.
SujataJK
10-Dec-15 6:31am
View
Thanks @Andy Lanng.
It Really helpful for me.I Solved my problem by changing DefaultAppPool setting of .net framework version to 4.0 in in Application pool.It Work.....
SujataJK
27-Nov-15 6:24am
View
Here I got the following Script ,Which gives me all Backup file within particular Folder.Its correct but i want only 3 Latest File .So If anyone have idea ,then give me.
IF OBJECT_ID('tempdb..#DirectoryTree') IS NOT NULL
DROP TABLE #DirectoryTree;
CREATE TABLE #DirectoryTree (
id int IDENTITY(1,1)
,subdirectory nvarchar(512)
,depth int
,isfile bit);
INSERT #DirectoryTree (subdirectory,depth,isfile)
EXEC master.sys.xp_dirtree 'D:\Sujata\SALESDBBackup',1,1;
SELECT *--,ROW_NUMBER()over (order by id desc)
FROM #DirectoryTree
WHERE isfile = 1 AND RIGHT(subdirectory,4) = '.BAK'
ORDER BY id desc;
ELSE
GO
SujataJK
26-Nov-15 6:33am
View
C#
SujataJK
26-Nov-15 6:19am
View
I want stored procedure for retrieve list of files (*.BAK) from particular folder.
SujataJK
5-Nov-15 4:05am
View
Thanx @Maciej Los It's Really helpful for me.
SujataJK
31-Oct-15 7:02am
View
but here i decalred list of class type means List<> itemDetails=new list<>()
Here List is of RepeaterData Class Type
SujataJK
31-Oct-15 7:00am
View
thanx
SujataJK
31-Oct-15 5:48am
View
List is declared like that
List<repeaterdata> itemDetails=new List<repeaterdata>();
SujataJK
31-Oct-15 5:46am
View
In Default.aspx.cs
like
List<repeaterdata> itemDetails = new List<repeaterdata>();
protected void BtnAdd_Click(object sender, EventArgs e)
{
itemDetails = GetItemDetails();
GridView1.DataSource = itemDetails;
GridView1.DataBind();
}
protected List<repeaterdata> GetItemDetails()
{
RepeaterData data = new RepeaterData();
data.INo = Convert.ToInt32(ItemNoList.Text);
data.IName = ItemNameList.Text;
data.Val1 = TxtVal1.Text;
data.Val2 = TxtVal2.Text;
data.Val3 = TxtVal3.Text;
data.Val4 = TxtVal4.Text;
data.Total = TxtTotal.Text;
itemDetails.Add(data);
con.Close();
return itemDetails;
}
}
SujataJK
26-Aug-15 2:07am
View
sir,In your code snippet what is items.is it class or xml object
SujataJK
26-Aug-15 1:36am
View
I think this will be helpful for me.Let me try.
thanks
SujataJK
25-Aug-15 8:25am
View
thanx
SujataJK
25-Aug-15 8:24am
View
application exit means browser close.
collect item from several webpages means take example of online shopping like that i have to add several item of different categories in single list.
SujataJK
25-Aug-15 7:50am
View
thanx.
here i want to collect item from several webpages and add in single list.For that i uesd static list in app_code/Class.cs .I got correct list but when my application exit then my list is still as it is.I want to reset my static list.
SujataJK
25-Aug-15 6:30am
View
thanks. The code in ItemSelection.aspx.cs page_load event as
protected void Page_Load(object sender, EventArgs e)
{
Class1 c = new Class1();
if (Request.QueryString["FilePath"] != null)
{
Session["itemcount"] = Convert.ToInt32(Session["itemcount"]) + 1;
int count = Convert.ToInt32(Session["itemcount"].ToString());
//here label2 is used for no.of item selected
label2.Text = count.ToString();
//list2 is used for store selected item
List<string> list2 = new List<string>();
//Response.Write("count=" + count);
//Here we add selected item in list2
list2.Add(Request.QueryString["FilePath"]);
// then i added this list into static list created in class under app_code/class
c.setArr(list2);
Session["itemList"]= c.getArr();
//If item selected then only i have created dynamic div with image control
if (count > 0)
{
for (int i = 0; i < count; i++)
{
HtmlGenericControl div1 = new HtmlGenericControl("div");
string j = (i + 1).ToString();
div1.Attributes.Add("id", "j");
//Response.Write(div1.Attributes.ToString());
div1.Attributes.Add("class", "top_rounded");
Image img = new Image();
//List<string> a = c.listItem;
List<string> a = (List<string>)Session["itemList"]; img.ImageUrl = a[i];
div1.Controls.Add(img);
Panel1.Controls.Add(div1);
}
}
SujataJK
20-Aug-15 3:25am
View
see my newly posted code from details
SujataJK
20-Aug-15 3:23am
View
thanx for ur reply .But I already used this website.It gives same problem.All other information displayed correctly only image shows cross mark.
SujataJK
20-Aug-15 3:14am
View
Here i retrieve image from sql server.
See My newly posted code .
SujataJK
20-Aug-15 3:11am
View
Thanx for ur reply...
My designing page include DataList control like that
<asp:DataList ID="DataList1" runat="server" RepeatColumns="4" RepeatDirection="Horizontal"Width="100%" BorderColor="Blue" BorderStyle="Solid" BorderWidth="3px">
<itemtemplate>
<asp:Label ID="Label2" runat="server" Text='<%# Eval("imagename") %>' Font-Italic="true"/><br />
<asp:Image ID="Image1" runat="server" ImageUrl='<%# "GetImageDatafromDB.aspx?id=" + System.Convert.ToString(Eval("ImageID")) %>'/>
<itemstyle horizontalalign="Center" verticalalign="Top">
//Code in the pageload event
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
string connectionString = ConfigurationManager.ConnectionStrings["MyConnection"].ConnectionString;
DataTable dt = new DataTable();
SqlConnection conn = new SqlConnection(connectionString);
using (conn)
{
SqlDataAdapter ad = new SqlDataAdapter("SELECT * FROM ImageGrid", conn);
ad.Fill(dt);
}
DataList1.DataSource = dt;
DataList1.DataBind();
}
}
// And the code in page load of GetImageDatafromDB.aspx
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
string imageID = Request.QueryString["id"];
string constr = ConfigurationManager.ConnectionStrings["MYConnection"].ConnectionString;
string sQuery = "SELECT image FROM ImageGrid WHERE imageID = @imageID";
SqlConnection con = new SqlConnection(constr);
SqlCommand cmd = new SqlCommand(sQuery, con);
cmd.Parameters.Add("@imageID", SqlDbType.Int).Value = Int32.Parse(imageID);
using (con)
{
con.Open();
SqlDataReader DR = cmd.ExecuteReader();
if (DR.Read())
{
byte[] imgData = (byte[])DR["Image"];
Response.BinaryWrite(imgData);
}
}
}
SujataJK
14-Jul-15 8:01am
View
Thanx .Its really helpful for me.
SujataJK
30-Jun-15 8:23am
View
thanx.I will be helpful for me.
SujataJK
30-Jun-15 8:10am
View
I have used .net framework 4.0
Show More