15,891,567 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 Deepak Kanswal Sharma (Top 112 by date)
Deepak Kanswal Sharma
25-Dec-16 7:53am
View
Deleted
Thanks for Comments!! Can you please share any tutorial which can be helpful.
Deepak Kanswal Sharma
24-Dec-16 11:27am
View
Deleted
Any tutorial or something?
Deepak Kanswal Sharma
24-Dec-16 11:25am
View
Deleted
Thanks for your reply. Can you share a link for Tutorial, on how to do it?
Deepak Kanswal Sharma
24-Dec-16 11:24am
View
Deleted
Thanks for your reply . Can you elaborate? Any tutorial or something?
Deepak Kanswal Sharma
24-Dec-16 11:20am
View
Thanks for your reply. Can you share a link from where I can get Idea? I'm completely lost right now!!
Deepak Kanswal Sharma
27-Sep-16 21:03pm
View
Any suggestions??
Deepak Kanswal Sharma
20-Aug-16 14:02pm
View
Deleted
I have this:-
body += "<br />
Click here to activate your account.
"
Deepak Kanswal Sharma
20-Aug-16 14:00pm
View
Deleted
body += "<br />
Click here to activate your account.
"
Deepak Kanswal Sharma
20-Aug-16 13:57pm
View
Thanks , but I already have this:-
body += "<br />
Click here to activate your account.
"
Don't know why It doesn't appear in the questoin
Deepak Kanswal Sharma
22-Apr-16 22:26pm
View
dbContext.SubmitChanges();
Deepak Kanswal Sharma
4-Mar-16 11:04am
View
Is there any other way to do this? With linq. If you have something please share.
Deepak Kanswal Sharma
4-Mar-16 3:37am
View
The value is 8. That's the case I can't understand why it's happening when I have value in id as 8 then how can it send null value to ID in table. :(
Deepak Kanswal Sharma
4-Mar-16 0:52am
View
Dear Manas,
Thanks for your answer and I think the problem is not with the linkbutton.
As I'm getting the value correct here:-
long id = Convert.ToInt64(e.CommandArgument); //The id is getting correct value.
ID = Convert.ToInt64(id), // Even here the value for id is correct. But the value for "ID" is null. DON'T KNOW WHY!!
Deepak Kanswal Sharma
3-Mar-16 20:15pm
View
The "ID" column is taking value "_Page". When I check it in debug.
Deepak Kanswal Sharma
3-Mar-16 19:31pm
View
Many times. The problem is
User_Information ui = new User_Information
{
UserName = insertuserinfo.UserName,
Password = insertuserinfo.Password,
FirstName = insertuserinfo.FirstName,
LastName = insertuserinfo.LastName,
Email = insertuserinfo.Email,
PhoneNo = insertuserinfo.PhoneNo,
Location = insertuserinfo.Location,
Created_By = insertuserinfo.Created_By,
Gender = insertuserinfo.Gender,
dob = Convert.ToDateTime(insertuserinfo.dob),
region = insertuserinfo.region,
lang = insertuserinfo.lang,
DeleteUser = Convert.ToChar(insertuserinfo.DeleteUser),
RegisterDate = Convert.ToDateTime(insertuserinfo.RegisterDate),
ID = Convert.ToInt64(id), //PROBLEM IS HERE.
};
The value in id is correct but it's not inserting the value in "ID"
Deepak Kanswal Sharma
27-Feb-16 6:03am
View
I'm using linq to sql
Deepak Kanswal Sharma
6-Feb-16 23:33pm
View
Oh Yeah!! I got the point. Of course it will need to assign a value to some variable. HOW SILLY OF ME!! Thanks :)
Deepak Kanswal Sharma
6-Feb-16 23:24pm
View
So I should Replace it with char?
Deepak Kanswal Sharma
31-Jan-16 8:35am
View
I don't know what to assign to output parameter? We always send the null values to database right?
Deepak Kanswal Sharma
31-Jan-16 7:15am
View
I replaced it with this :-
System.Nullable<char> outpt = null;
System.Nullable<long> id = Convert.ToInt64(Session["USERID"]);
dbContext.passwrdchange(id, old.Text.ToString().Trim(), newpass.Text.ToString().Trim(), ref outpt);
Also I changed the line:-
this.passwrdchange(((System.Nullable<long>)(obj.ID)), default(string), default(string),default(System.Nullable<char>));
with
this.passwrdchange(((System.Nullable<long>)(obj.ID)), default(string), default(string),ref default(System.Nullable<char>));
The error changed to :-
"A ref or out argument must be an assignable variable"
Deepak Kanswal Sharma
31-Jan-16 7:07am
View
It is a system generated code for linq.
Deepak Kanswal Sharma
29-Jan-16 22:08pm
View
It says :- The Best Overloaded method for 'SampleDataContext.passwrdchange(int?,string,string,ref char?)' has some invalid arguments.
This is my code for linq :-
[global::System.Data.Linq.Mapping.FunctionAttribute(Name="dbo.passwrdchange")]
public int passwrdchange([global::System.Data.Linq.Mapping.ParameterAttribute(Name="ID", DbType="BigInt")] System.Nullable<int> iD, [global::System.Data.Linq.Mapping.ParameterAttribute(DbType="VarChar(MAX)")] string oldpass, [global::System.Data.Linq.Mapping.ParameterAttribute(DbType="VarChar(MAX)")] string newpass, [global::System.Data.Linq.Mapping.ParameterAttribute(Name="Out", DbType="Char(1)")] ref System.Nullable<char> @out)
{
IExecuteResult result = this.ExecuteMethodCall(this, ((MethodInfo)(MethodInfo.GetCurrentMethod())), iD, oldpass, newpass, @out);
@out = ((System.Nullable<char>)(result.GetParameterValue(3)));
return ((int)(result.ReturnValue));
}
Deepak Kanswal Sharma
29-Jan-16 22:01pm
View
I changed the parameter type from ref to out but nothing happened.
Deepak Kanswal Sharma
16-Jan-16 21:10pm
View
It's not throwing any errors. The problem is that
These lines :-
item.u.UserName = item.r.UserName;
item.r.height = Height.Text.Trim();
item.r.region = Religion.Text.Trim();
item.r.employed = Working.Text.Trim();
item.u.Location = Living_In.Text.Trim();
item.r.profession = Profession.Text.Trim();
item.r.about = about.Text.Trim();
Are not taking the modified value in textbox, but the same values which have been populated to them.
Deepak Kanswal Sharma
9-Jan-16 0:46am
View
It's a LINQ to Dataset DBNULL problem / null reference exception and throws an 'Object reference not set to an instance of an object' Error
Deepak Kanswal Sharma
9-Jan-16 0:32am
View
But the problem now is if there is any null value in any database column. The values don't populate after populating that column. Can somebody please help me with this?
Deepak Kanswal Sharma
7-Jan-16 20:02pm
View
My aspx page is really a long one so I can't post it here. I've given the .cs code which is applied on page_load.
Deepak Kanswal Sharma
2-Jan-16 23:39pm
View
var queryuserinfo = (from User_Information in dbContext.User_Informations
where User_Information.UserName == Session["MatriUser"].ToString()
select new info
{
id = User_Information.ID,
username = User_Information.UserName,
firstname = User_Information.FirstName,
lastname = User_Information.LastName,
email = User_Information.Email,
phone = User_Information.PhoneNo,
location = User_Information.Location,
createdby = User_Information.Created_By,
gender = User_Information.Gender,
dtob = User_Information.dob,
region = User_Information.region,
lang = User_Information.lang
}).ToList();
IEnumerable<info>myinfo
I tried this, but it's giving me error 'The type or namespace name 'info' could not be found'
Deepak Kanswal Sharma
12-Nov-15 20:49pm
View
Images are stored in the required folder only. All the images are stored in the same folder the problem is some of them don't load whenever a picture is clicked to load in bigger format. Does image size has to deal with it?
Deepak Kanswal Sharma
12-Nov-15 20:42pm
View
Images are stored in the "Img" folder.
Following is the code for uploading images:-
protected void Button1_Click(object sender, EventArgs e)
{
if (FileUpload1.HasFile)
{
uploadimage(FileUpload1, TextBox2, grouptype);
}
if (FileUpload2.HasFile)
{
uploadimage(FileUpload2, TextBox3, grouptype);
}
if (FileUpload3.HasFile)
{
uploadimage(FileUpload3, TextBox4, grouptype);
}
if (FileUpload4.HasFile)
{
uploadimage(FileUpload4, TextBox5, grouptype);
}
if (FileUpload5.HasFile)
{
uploadimage(FileUpload5, TextBox6, grouptype);
}
if (FileUpload6.HasFile)
{
uploadimage(FileUpload6, TextBox7, grouptype);
}
ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('Pictures Uploaded Successfully')", true);
}
public void uploadimage(FileUpload f1, TextBox t1, DropDownList d1)
{
SqlConnection con = new SqlConnection(ConfigurationManager.AppSettings["str"]);
con.Open();
string stre = System.IO.Path.GetExtension(f1.FileName);
string strng = f1.FileName;
string s = System.DateTime.Now.Ticks.ToString() + "." + stre;
f1.SaveAs(Server.MapPath("Img/") + stre);
//SqlDataAdapter da = new SqlDataAdapter("Select count(*)+1 as d from ddate", con);
//int a = Convert.ToInt32("Select (count(*)+1) as d from ddate");
string query = "insert into date1 values('" + TextBox1.Text + "','" + strng + "','" + t1.Text + "','" + grouptype.SelectedItem.Value + "')";
SqlCommand cmd = new SqlCommand(query, con);
cmd.ExecuteNonQuery();
con.Close();
}
Deepak Kanswal Sharma
30-Oct-15 2:54am
View
Hello,
Actually I'm getting another error. While trying to get my table values to gridview, I'm getting this error "The conversion of a varchar data type to a datetime data type resulted in an out-of-range value"
How can I Resolve this??
Here's my code for HTML:-
<div class="col-lg-3 col-md-3" style="float: left">
<asp:DataList runat="server" ID="dataimg" RepeatColumns="4" RepeatDirection="Horizontal" ItemStyle-CssClass="panel panel-default">
<itemtemplate>
<li class="list-group-item list-group" style="width: 200px">
<asp:HyperLink ID="HyperLink1" NavigateUrl='<%# String.Concat("Img/",Eval("image")) %>'
Target="_blank" runat="server">
<img src='Img/<%#Eval("image") %>' alt="15aug" width="160px" height="160px" />
<asp:Label ID="Label1" runat="server" CssClass="text text-default" Font-Size="12px" Text='<%#Eval("detail") %>'>
<%--<label id="label">
View Details
</label>--%>
</li>
</div>
Here's my code for C#:-
protected void Unnamed1_Click(object sender, EventArgs e)
{
// NB: The "as" operator can return null:
LinkButton lnk = sender as LinkButton;
if (lnk == null)
{
throw new InvalidOperationException("sender is not a LinkButton!");
}
DateTime theDate;
// NB: If your date is in a specific format, use TryParseExact instead.
string format = "dd-MM-yyyy";
if (!DateTime.TryParseExact(lnk.Text, format, null, DateTimeStyles.None, out theDate))
{
// The text is not a valid date:
throw new FormatException(string.Format("The value '{0}' is not a valid date.", lnk.Text));
}
TextBox1.Text = lnk.Text;
using (SqlConnection con1 = new SqlConnection(ConfigurationManager.AppSettings["str"]))
using (SqlCommand cmd = new SqlCommand("SELECT * FROM date1 WHERE ddate = @ddate", con1))
{
cmd.Parameters.AddWithValue("@ddate", theDate.Date);
DataSet ds1 = new DataSet();
SqlDataAdapter da1 = new SqlDataAdapter(cmd);
da1.Fill(ds1);
dataimg.Visible = true;
dataimg.DataSource = ds1;
dataimg.DataBind();
}
}
Deepak Kanswal Sharma
22-Oct-15 0:01am
View
It's done dude!! Thanks.
I modified the code to this:-
protected void Unnamed1_Click(object sender, EventArgs e)
{
// NB: The "as" operator can return null:
LinkButton lnk = sender as LinkButton;
if (lnk == null)
{
throw new InvalidOperationException("sender is not a LinkButton!");
}
DateTime theDate;
// NB: If your date is in a specific format, use TryParseExact instead.
string format = "dd-MM-yyyy";
if (!DateTime.TryParseExact(lnk.Text, format, null, DateTimeStyles.None, out theDate))
{
// The text is not a valid date:
throw new FormatException(string.Format("The value '{0}' is not a valid date.", lnk.Text));
}
TextBox1.Text = lnk.Text;
using (SqlConnection con1 = new SqlConnection(ConfigurationManager.AppSettings["str"]))
using (SqlCommand cmd = new SqlCommand("SELECT * FROM date1 WHERE ddate = @ddate", con1))
{
cmd.Parameters.AddWithValue("@ddate", theDate.Date);
DataSet ds1 = new DataSet();
SqlDataAdapter da1 = new SqlDataAdapter(cmd);
da1.Fill(ds1);
dataimg.Visible = true;
dataimg.DataSource = ds1;
dataimg.DataBind();
}
}
Deepak Kanswal Sharma
21-Oct-15 23:25pm
View
Deleted
One more thing I've an Imagebutton, now on click of it the date values are loading in gridview (also with time :( ). How can I get only the date in this gridview and not the time.
My code:-
protected void aug_Click(object sender, ImageClickEventArgs e)
{
SqlConnection con = new SqlConnection(ConfigurationManager.AppSettings["str"]);
con.Open();
SqlDataAdapter da = new SqlDataAdapter("Select distinct ddate from date1 where groups='15 August'", con);
DataSet ds = new DataSet();
da.Fill(ds, "date1");
GridView1.DataSource = Convert.ToDateTime(ds);
GridView1.DataBind();
con.Close();
dataimg.Visible = false;
}
Deepak Kanswal Sharma
21-Oct-15 22:38pm
View
Thanks. And I tried that code but still the date is coming in this format {8/15/2015 12:00:00 AM}. I guess the link button is creating the problem as the value in database also reads {2015-08-15} only.
Deepak Kanswal Sharma
21-Oct-15 22:22pm
View
yes
Deepak Kanswal Sharma
21-Oct-15 13:34pm
View
Sorry for the previous question, So I updated it now. Hope you can understand now.
Deepak Kanswal Sharma
21-Oct-15 13:28pm
View
I can't as the value is coming to link button.
Deepak Kanswal Sharma
29-Sep-15 22:25pm
View
Yes I did. Actually they are changing at 750px so I increased the size to 900px in navbar-collapse but nothing happened.
Deepak Kanswal Sharma
29-Sep-15 21:37pm
View
How can I change them in the navbar?
Deepak Kanswal Sharma
27-Sep-15 0:41am
View
My main div:-
<div class="main-navigation animated with-dropdown-buttons" >
<!-- -->
<div class="container-fluid">
Deepak Kanswal Sharma
27-Sep-15 0:40am
View
Deleted
This is my main div:-
<div class="main-navigation animated with-dropdown-buttons" >
<div class="container-fluid">
Deepak Kanswal Sharma
28-Aug-15 23:10pm
View
<div class="container-fluid">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
paisadaddy.com
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
<li>
Home
</li>
<li class="dropdown">
Loan
<ul class="dropdown-menu list-group">
<li class="list-group-item">
Personel Loans
</li>
<li class="list-group-item">
Home Loans
</li>
<li class="list-group-item">
Loan Against Property
</li>
<li class="list-group-item">
Vehicle Loans
</li>
<li class="list-group-item">
Education Loans
</li>
<li class="list-group-item">
Business Loans
</li>
<li class="list-group-item">
Expert Advice
</li>
</ul>
</li>
<li>
Insurance
</li>
<li>
Cards
</li>
<li class="dropdown">
FD / RD
<ul class="dropdown-menu">
<li>
Fixed Deposit
</li>
<li>
Recurring Deposit
</li>
</ul>
</li>
<li class="dropdown">
Accounts
<ul class="dropdown-menu">
<li>
Savings Account
</li>
<li>
Current Account
</li>
<li>
PPF Account
</li>
<li>
Demat Account
</li>
</ul>
</li>
Deepak Kanswal Sharma
28-Aug-15 23:09pm
View
<link href="<%=Page.ResolveUrl( "~/StyleSheet.css") %>" rel="Stylesheet" type="text/css" />
<link href="<%=Page.ResolveUrl( "~/bootstrap-3.3.5-dist/css/bootstrap.css") %>" rel="stylesheet" type="text/css" />
<link href="<%=Page.ResolveUrl( "~/bootstrap-3.3.5-dist/css/bootstrap.min.css") %>" rel="stylesheet" type="text/css" />
<link href="<%=Page.ResolveUrl( "~/bootstrap-3.3.5-dist/css/bootstrap-theme.css") %>" rel="stylesheet" type="text/css" />
<link href="<%=Page.ResolveUrl( "~/font-awesome-4.4.0/css/font-awesome.min.css") %>" rel="stylesheet" type="text/css" />
<link href="<%=Page.ResolveUrl( "~/common.css") %>" rel="Stylesheet" type="text/css" />
<script src="<%=Page.ResolveUrl( "~/slider/jquery.js") %>" type="text/javascript"></script>
<script src="<%=Page.ResolveUrl( "~/slider/nslider.js") %>" type="text/javascript"></script>
<script src="<%=Page.ResolveUrl( "~/auto_complete.js") %>" type="text/javascript"></script>
Deepak Kanswal Sharma
5-Aug-15 22:26pm
View
Yup that solved it. I changed the 1/3 to 0.33333. And it's done. Thanks a lot!!!!
Deepak Kanswal Sharma
5-Aug-15 21:55pm
View
The conversion is needed as I want to the math.pow and math.round operations is there any other way to do it?
Deepak Kanswal Sharma
5-Aug-15 21:54pm
View
you mean I should change the 1/3 to 0.33 ?
Deepak Kanswal Sharma
5-Aug-15 21:49pm
View
I've tried the debug and breakpoint.
Although the values I get are all correct but Ramt2 is getting a value 0.00 which is creating problem in calculation.
Deepak Kanswal Sharma
4-Aug-15 11:19am
View
Thanks buddy. Well explained!! Sometimes so small error can create so much mess. ;)
Deepak Kanswal Sharma
8-Jul-15 11:09am
View
I've tried that code . But it's not working.
I'm giving blank links . Is it creating a problem?
Deepak Kanswal Sharma
22-Jun-15 22:32pm
View
Yeah, I already tried that code but it's not working.
Deepak Kanswal Sharma
22-Jun-15 1:29am
View
Although with the above code. The values are getting saved in sql whenever F5 is hit or page is refreshed.
Deepak Kanswal Sharma
19-Jun-15 22:51pm
View
Oh yeah baby!! It worked. Actually on page source code I found the ID was '#ContentPlaceHolder1_CheckBox1' not '#CheckBox1'.
Got It!!
Thanks for your support! ;)
Deepak Kanswal Sharma
19-Jun-15 12:30pm
View
Thanks buddy, but this isn't my question.
Sorry if I haven't made it clear.
What I want is if checkbox is checked, it should call the function uservalid() onclientclick of button "compare rates"
Deepak Kanswal Sharma
19-Jun-15 12:25pm
View
How can I see that step by step process?
Deepak Kanswal Sharma
19-Jun-15 12:18pm
View
Even this is not working:-
function callme() {
if($('#CheckBox1').is(':checked'))
uservalid();
};
Deepak Kanswal Sharma
19-Jun-15 12:13pm
View
Deleted
Okay I changed it like this:-
$(function callme() {
if($('#CheckBox1').is(':checked')) {
uservalid();
}
});
But still it's not working
Deepak Kanswal Sharma
6-Jun-15 9:58am
View
Well SA I got your point, you are telling me to make a single page instead of two pages and instead of moving the data I should replace the 'div' with another 'div'.
So should I replace my C# code with some javascript or JQuery?
Deepak Kanswal Sharma
5-Jun-15 12:13pm
View
Ok I tried this thing, but it didn't work:-
protected void lnk1_Click(object sender, EventArgs e)
{
LinkButton lnk1 = sender as LinkButton;
Label2.Text= ((Label)DataList1.SelectedItem.FindControl("lnk1")).Text;
Response.Redirect("album.aspx?pid=" + Label2.Text);
}
Deepak Kanswal Sharma
4-Jun-15 11:26am
View
Thanks Ryan, But where and how can I use it?
Deepak Kanswal Sharma
23-Apr-15 10:47am
View
Or your question is not clear.
Deepak Kanswal Sharma
23-Apr-15 10:46am
View
Do you know about something known as google?
Deepak Kanswal Sharma
23-Apr-15 10:44am
View
Google banned in your country!! LOL!!
Deepak Kanswal Sharma
23-Apr-15 3:22am
View
What have you tried?
Deepak Kanswal Sharma
23-Apr-15 3:04am
View
You haven't tried anything with javascript!?
Deepak Kanswal Sharma
22-Apr-15 3:01am
View
Have you tried the <Header> and template?? If yes what error you are getting?
Deepak Kanswal Sharma
22-Apr-15 3:00am
View
Oh I'm sorry. My mistake.
Deepak Kanswal Sharma
22-Apr-15 2:37am
View
Will a solution in sql help you? I've made that project on bank and really enjoyed it!! ;)
Deepak Kanswal Sharma
21-Apr-15 22:18pm
View
What have you tried?
Deepak Kanswal Sharma
21-Apr-15 8:33am
View
While trying that code my server gives the error:- "Unable to save object because the statement is not supported. It must begin with CREATE or ALTER".
Deepak Kanswal Sharma
21-Apr-15 8:23am
View
Do you want each row in different color?
Deepak Kanswal Sharma
21-Apr-15 5:59am
View
Can you use dropdownlist instead of radiobutton?
Also you can take help of stored procedures.
Deepak Kanswal Sharma
21-Apr-15 4:03am
View
You want to use javascript or jquery?
Or a simple HTML code is all you need?
Deepak Kanswal Sharma
21-Apr-15 3:39am
View
What about the rows syntax?
Deepak Kanswal Sharma
21-Apr-15 3:21am
View
Have you tried changing the index?
label2.Text = dr1[1].ToString();
Deepak Kanswal Sharma
21-Apr-15 2:43am
View
Thanks for the help!!
But I can't understand the difference. Why declare my values when I've already made the table in database. And why is that the table is not available in the database.
Deepak Kanswal Sharma
20-Apr-15 23:33pm
View
Where is the connection string ????????? "con"
Deepak Kanswal Sharma
20-Apr-15 23:31pm
View
What if multiple data is to be selected in second dropdown??
Deepak Kanswal Sharma
20-Apr-15 23:28pm
View
You mean you need the dropdownlist containing each element as a link to seperate page?
Deepak Kanswal Sharma
20-Apr-15 22:01pm
View
We don't do your homework. Yeah right!! :D :D
Deepak Kanswal Sharma
20-Apr-15 21:59pm
View
At first it wasn't showing me any table in my database, then I created the table card1 in "new" database.
I think I'm doing something very wrong! :(
Deepak Kanswal Sharma
15-Apr-15 12:56pm
View
So I tried the debug. This is what I got:-
Uncaught SyntaxError: Unexpected end of inputmessage: "Unexpected end of input"stack: (...)get stack: function () { [native code] }set stack: function () { [native code] }__proto__: ErrorVM93:847 InjectedScript._evaluateOnVM93:780 InjectedScript._evaluateAndWrapVM93:646 InjectedScript.evaluate
Deepak Kanswal Sharma
15-Apr-15 12:49pm
View
How have you joined the two tables? Which columns are you comparing?
Deepak Kanswal Sharma
15-Apr-15 2:32am
View
You mean:-
if(condition)
and
if(condition)
Deepak Kanswal Sharma
15-Apr-15 2:32am
View
I'm not using master page.
Deepak Kanswal Sharma
15-Apr-15 2:29am
View
Thanks buddy,
But I'm a little bit confused though.
How can I verify, weather the user have given anything in textbox or not.
I want if there is no value in the textbox then the total gives 0.
Is this the code then:-
if (res==0) {
document.getElementById('TextBox3').value = res;
}
else
document.getElementById('TextBox3').value = 0;
Deepak Kanswal Sharma
15-Apr-15 2:25am
View
So you want the code on your local server. Right?
I guess you have to get sql server installed on your PC for that.
If I'm wrong , please correct me.
Deepak Kanswal Sharma
14-Apr-15 12:21pm
View
What ?? I don't understand!!
Deepak Kanswal Sharma
14-Apr-15 12:20pm
View
It works fine this way. What's the other way out??
Deepak Kanswal Sharma
14-Apr-15 12:19pm
View
where do you want to export the SQL file ??
Deepak Kanswal Sharma
8-Feb-15 6:56am
View
Great dude!! That worked! Thanks a lot. ;)
Deepak Kanswal Sharma
8-Jan-15 10:53am
View
Dear Sumit,
Here is my complete path:- C:\Users\Deepak Sharma\Documents\Visual Studio 2010\WebSites\Uttrakhand\Img
I can't understand how can I save complete path. It'll be a great help, if you can tell me how to do that.
Thanks!! :)
Deepak Kanswal Sharma
6-Jan-15 10:04am
View
The string "path" is showing null value. :(
I tried both double slash(//) as well as single slash (/). But no use!!
Deepak Kanswal Sharma
4-Jan-15 21:02pm
View
Ok I included that namespace System.IO
and applied the following code:-
string file_name = GridView2.DataKeys[e.RowIndex].Value.ToString(); //your Image name
string path = Server.MapPath("Img//" + file_name);
FileInfo file = new FileInfo(path);
if (file.Exists)//check file exsit or not
{
file.Delete();
}
else
{
//"File does not exist";
}
Still The image file is not deleted from server.
My folder name is 'Img';
Please HELP!! Thanks!!
Deepak Kanswal Sharma
3-Jan-15 9:20am
View
Thanks bro, but can you explain the line:-
FileInfo file = new FileInfo(path);
Do I have to use some another library files for this?
My c# shows it is not a correct format and cannot search the 'FileInfo'.
Deepak Kanswal Sharma
3-Jan-15 9:13am
View
Sorry bro, I could not get you.
I'm already using that Command in sql and it is working just fine!
This is my Gridview2:-
<asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False"
DataKeyNames="RefrenceNo" onrowcancelingedit="GridView2_RowCancelingEdit"
onrowediting="GridView2_RowEditing" onrowupdating="GridView2_RowUpdating"
onrowdeleting="GridView2_RowDeleting1">
<columns>
<asp:TemplateField HeaderText="Pics">
<itemtemplate>
<img src='Img/<%#Eval("image") %>' width="80px" height="80px" />
<asp:TemplateField HeaderText="About The Photo">
<itemtemplate>
<asp:Label ID="Label1" runat="server" Text='<%#Eval("detail") %>'>
<edititemtemplate>
<asp:TextBox ID="text" runat="server" Text='<%#Eval("detail") %>'>
<asp:CommandField ShowEditButton="True" />
<asp:CommandField ShowDeleteButton="True" />
Deepak Kanswal Sharma
29-Dec-14 11:06am
View
My delete is happening. But only pic's detail in database. The pic is not getting deleted from server.
For binding I use sqlserver command.
Select Command:-Select distinct ddate from date1
ddate column data type:- date
No exception in code.
Deepak Kanswal Sharma
28-Dec-14 10:42am
View
Have you tried adding new contentplaceholder?
Deepak Kanswal Sharma
28-Dec-14 10:18am
View
Thanks all for Your Comments!! It's really helpful!
Deepak Kanswal Sharma
28-Dec-14 10:17am
View
That's Done MAN!! Thanks!! Thanks A Ton!! ;)
Deepak Kanswal Sharma
25-Dec-14 22:14pm
View
How can I apply that. Please explain. Thanks
Deepak Kanswal Sharma
25-Dec-14 1:22am
View
Not existing row dear. I want to make a new row into existing table. And want to increase the column value "RefrenceNo" by +1.
Deepak Kanswal Sharma
23-Dec-14 10:14am
View
I'm not making any new table. Just want to update the existing one. And add the values to column RefrenceNo.
If I can't add it in insert into command, can I process it by getting value into any int and then adding it?
Deepak Kanswal Sharma
23-Dec-14 6:11am
View
Ok I tried that also set RefrenceNo as primary key.
And when I submit the button. I get the error:-
"Column name or number of supplied values does not match table definition."
Deepak Kanswal Sharma
23-Dec-14 5:59am
View
Yeah I notice there's the wrong table name. I edited it as date1.
Now I want when I click the submit button, the 'RefrenceNo' column gets the incremented value and rest of the fields get updated from textboxes.
This is my table:-
RefrenceNo------ddate-------------image------detail
1------------2014-11-09-----1698309388_n.jpg--NULL
2------------2014-11-09-----6403019191_n.jpg--NULL
3------------2014-11-15-----11111banner1.jpg--This is
4------------2014-11-15-----banner111112.jpg--xasxa
Deepak Kanswal Sharma
23-Dec-14 5:26am
View
Mehdi Sir,
I already saw this link on w3schools, But I'm not making a new table anywhere. Just I'm updating the table. And I want every time I insert the new row the 'RefrenceNo' Column Increase by +1.
This is my table:-
RefrenceNo ddate image detail
1 2014-11-09 1698309388_n.jpg NULL
2 2014-11-09 6403019191_n.jpg NULL
3 2014-11-15 11111banner1.jpg This is
4 2014-11-15 banner111112.jpg xasxa
5 2014-12-16 7152111110_n.jpg Science
6 2014-12-16 images111111.jpg Girl
Deepak Kanswal Sharma
23-Dec-14 5:16am
View
C'mon guys!! Every problem has a solution!! May be not today, I'll get it tomorrow. Thanks for your comments!! :)
Deepak Kanswal Sharma
23-Dec-14 0:58am
View
Thanks brother. It's done.
Deepak Kanswal Sharma
21-Dec-14 12:20pm
View
While doing the above code I am getting an error:-
System.Data.DataRowView' does not contain a property with the name 'RefrenceNo'
Deepak Kanswal Sharma
18-Dec-14 11:48am
View
That's done Dude!!
Thanks a lot!!!!!!!! You were really helpful. ;-)
Deepak Kanswal Sharma
17-Dec-14 11:42am
View
I tried that one too. But there's an error as " The server tag is not well formed."
Deepak Kanswal Sharma
16-Dec-14 11:32am
View
Dear Vimal,
I changed my code as under:-
<asp:GridView runat="server" ID="GridView1" xmlns:asp="#unknown" AutoGenerateColumns="False"
onrowdeleting="GridView1_RowDeleting" >
<columns>
<asp:TemplateField HeaderText="Select Date">
<itemtemplate>
<asp:LinkButton runat="server" ID="lnk" onclick="Unnamed1_Click" ><%#Eval("ddate") %>
<asp:CommandField ShowDeleteButton="True" />
And added cs files as:-
LinkButton lnk=sender as LinkButton;
TextBox1.Text = lnk.Text;
But still it's not working. :-(
And the date format in the gridview is like:-
11/9/2014 12:00:00 AM
Please Help!! Thanks.
Deepak Kanswal Sharma
14-Dec-14 7:42am
View
Thanks for your help. But the code is still not working.
I can't get the template value into the textbox.
The textbox has null value.
Show More