16,004,778 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 sathiyak (Top 82 by date)
sathiyak
28-Mar-12 2:24am
View
this is not a homework...
sathiyak
7-Mar-12 5:32am
View
can you pls give code for retrieve that resume in database n save that resume ?
sathiyak
2-Mar-12 6:34am
View
ya ok..but i have to show in register page when we enter email if it already there in database it should show already available..how to do...
sathiyak
1-Mar-12 23:42pm
View
ok..i have to highlight the selected row in datalist..now can you help..
sathiyak
28-Feb-12 8:56am
View
nice...
sathiyak
28-Feb-12 8:49am
View
i dont need forgot password and all ...first thing is when i enter right email & wrong pw it should show "invalid credentials"...but when i enter email like ggg and wrong password it should display"pleasr register to login"....
sathiyak
28-Feb-12 8:40am
View
loginfail==3...why this?
sathiyak
28-Feb-12 8:14am
View
in this i just show only one msg...but i have to show 2 messages for above conditions...
sathiyak
27-Feb-12 0:36am
View
in interview HR asked me just IN gridview whether we can insert data directly or not?thats my question..
sathiyak
27-Feb-12 0:16am
View
this question is asked by HR in my interview...i know just this question...
sathiyak
25-Feb-12 3:43am
View
ok sir...
sathiyak
25-Feb-12 2:03am
View
in server...
sathiyak
25-Feb-12 1:54am
View
i have solved..thank you
sathiyak
24-Feb-12 1:52am
View
if firebox,there is any options..
sathiyak
24-Feb-12 1:24am
View
if anyone know pls give solution....
sathiyak
24-Feb-12 1:04am
View
it is run in local correctly but problem is when upload it is not work out...
sathiyak
24-Feb-12 0:57am
View
Deleted
protected void btnnadd_Click(object sender, EventArgs e)
{
if (uploadcollogo.HasFile == true)
{
try
{
//string fileName = Server.HtmlEncode(uploadcollogo.FileName);
System.Drawing.Image image_file = System.Drawing.Image.FromStream(uploadcollogo.PostedFile.InputStream);
int image_height = image_file.Height;
int image_width = image_file.Width;
int max_height = 240;
int max_width = 320;
image_height = (image_height * max_width) / image_width;
image_width = max_width;
if (image_height > max_height)
{
image_width = (image_width * image_height) / image_width;
image_width = max_width;
}
else
{
}
Bitmap bitmap_file = new Bitmap(image_file, image_width, image_height);
System.IO.MemoryStream stream = new System.IO.MemoryStream();
bitmap_file.Save(stream, System.Drawing.Imaging.ImageFormat.Jpeg);
stream.Position = 0;
byte[] image = new byte[stream.Length + 1];
stream.Read(image, 0, image.Length);
string fileName = Path.GetFileName(uploadcollogo.FileName);
//string image1 = MapPath("~/userside/collogo/" + fileName);
string ServerSavePath = Server.MapPath("/Upload");
string path = Path.Combine(ServerSavePath, fileName);
string image1 = "~/userside/collogo/" + fileName;
string status = "Active";
////SqlConnection cn = new SqlConnection(ConfigurationManager.ConnectionStrings["Connection"].ConnectionString);
SqlConnection cn = new SqlConnection(ConfigurationManager.AppSettings["constring"].ToString());
cn.Open();
SqlCommand cmd = new SqlCommand();
cmd.CommandText = "pcolinsert";
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.AddWithValue("@colname", txtcolname.Text);
cmd.Parameters.AddWithValue("@colmobile1", txtcolmobile1.Text);
cmd.Parameters.AddWithValue("@colmobile2", txtcolmobile2.Text);
cmd.Parameters.AddWithValue("@collandline", txtcollandline.Text);
cmd.Parameters.AddWithValue("@collemail1", txtcolemail.Text);
cmd.Parameters.AddWithValue("@colaltemail", txtcolaltemail.Text);
cmd.Parameters.AddWithValue("@coladdress", txtcoladdr.Text);
cmd.Parameters.AddWithValue("@colwebsite", txtcolwebsite.Text);
cmd.Parameters.AddWithValue("@colcountry", ddlcountry.SelectedItem.Text);
cmd.Parameters.AddWithValue("@colstate", ddlstate.SelectedItem.Text);
cmd.Parameters.AddWithValue("@colcity", txtcolcity.Text);
cmd.Parameters.AddWithValue("@collandmark", txtcollandmark.Text);
cmd.Parameters.AddWithValue("@collogo", image);
cmd.Parameters.AddWithValue("@status", status);
cmd.Connection = cn;
cmd.ExecuteNonQuery();
uploadcollogo.SaveAs(Server.MapPath(image1));
cn.Close();
clear();
// Response.Write("<script>alert('Record Inserted Sucessfuly')</script>");
Page.ClientScript.RegisterStartupScript(this.GetType(), "Inserted", "<script>alert('Record Inserted Sucessfuly')</script>");
}
catch (Exception ex)
{
lblerrmsg.Text = "Record Not Inserted Successfully";
}
}
}
sathiyak
24-Feb-12 0:36am
View
there is a path...it runs on local correctly..but in server only problem..
sathiyak
24-Feb-12 0:26am
View
Record Not Inserted SuccessfullyCould not find a part of the path 'D:\Hosting\7375777\html\userside\clogo\indexrrr.jpg'.....my friend got this error.....
sathiyak
24-Feb-12 0:15am
View
it has page for insert values...when i am add it is not inserted but also no error came..
sathiyak
23-Feb-12 8:06am
View
i am only posted above question..now i cleared about it..
sathiyak
23-Feb-12 7:50am
View
now i got it.....that is we have to put gridview within the contentplaceholder correctly...
sathiyak
23-Feb-12 7:02am
View
in design page grid not visible..at execution only it shows...
sathiyak
22-Feb-12 7:28am
View
i have no idea about this concept...
sathiyak
20-Feb-12 1:28am
View
instead this we also give,autosize property as false we can change that label size....anyway thanks...
sathiyak
20-Feb-12 0:30am
View
got it...
sathiyak
16-Feb-12 5:55am
View
if (uploadresume.HasFile == true)
{
if ((uploadresume.PostedFile.ContentLength / 1024) <= 300)
{
cn.Open();
Stream fs = uploadresume.PostedFile.InputStream;
BinaryReader br = new BinaryReader(fs);
Byte[] bytes = br.ReadBytes((Int32)fs.Length);
SqlCommand cmd = new SqlCommand();
cmd.CommandText = "pupusrresume";
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.AddWithValue("@loginemailid", Convert.ToInt32(Session["loginemailid"].ToString()));
//cmd.Parameters.AddWithValue("@resume", usrresume);
cmd.Parameters.Add("@resume", SqlDbType.VarBinary).Value = bytes;
cmd.Connection = cn;
cmd.ExecuteNonQuery();
cn.Close();
//clear();
Page.ClientScript.RegisterStartupScript(this.GetType(), "Updated", "<script>alert('Yor resume Updated')</script>");
}
}
sathiyak
13-Feb-12 7:17am
View
no,the textbox name should bind in the next page label....after login immediately...
sathiyak
13-Feb-12 7:16am
View
if (Request.QueryString["username"] != null)....after this line the cursor does not go inside ...why...
sathiyak
13-Feb-12 7:04am
View
i have login page in that i have textbox called txtusername.....but i have to bind this textbox name to another one page...clear
sathiyak
13-Feb-12 4:13am
View
thanks...
sathiyak
10-Feb-12 5:52am
View
give me any other solution if u know...
sathiyak
10-Feb-12 1:57am
View
how to check...i am a beginner...so pls tell
sathiyak
10-Feb-12 1:08am
View
no i need image in string..not binary...
sathiyak
10-Feb-12 0:58am
View
image type is varchar......do u the alternative code for below;
context.Response.BinaryWrite((byte[])dr["clogo"]);//here error comes like this//
if u know pls let me know...
sathiyak
10-Feb-12 0:57am
View
these code are in vb.net...i need c# code..i dt know vb...
sathiyak
10-Feb-12 0:42am
View
context.Response.BinaryWrite((byte[])dr["clogo"]);//here error comes like below:
Unable to cast object of type 'System.String' to type 'System.Byte[]'.
sathiyak
9-Feb-12 5:53am
View
there is any wayfor save the string image as byte images...
sathiyak
9-Feb-12 5:46am
View
clogo is imagename its datatype is image....and it stored as binary data in db..but when i upload image it shows error like"Failed to convert parameter value from a String to a Byte[]".how to solve this error?
sathiyak
8-Feb-12 2:28am
View
it gives error....
sathiyak
7-Feb-12 8:23am
View
sorry i did not get....when i'm executing it gives this error...why
sathiyak
7-Feb-12 6:29am
View
clogo is an image name
sathiyak
3-Feb-12 1:54am
View
can't understood..........
sathiyak
1-Feb-12 1:27am
View
this is the code for bind data's in datalist....
public void datalist()
{
if (con.State == ConnectionState.Closed)
{
con.Open();
}
SqlCommand cmd = new SqlCommand("select pro_id,pro_name,pro_img,price from product where status='A'and type='retail'", con);
SqlDataAdapter da = new SqlDataAdapter(cmd);
DataSet ds = new DataSet();
da.Fill(ds);
DataList1.DataSource = ds;
DataList1.DataBind();
con.Close();
}
sathiyak
23-Dec-11 1:09am
View
c# coding...
sathiyak
22-Dec-11 1:21am
View
tks for asking...got it...
sathiyak
22-Dec-11 0:42am
View
as my code,it creates only 2 or 3 digits....but i want more...so can you tell how to get maximum numbers...like 5 or 6 digits or watever maybe..
sathiyak
21-Dec-11 1:26am
View
but it is not clear...help...
sathiyak
20-Dec-11 0:12am
View
c#
sathiyak
15-Dec-11 0:10am
View
Deleted
got it...
sathiyak
6-Dec-11 1:22am
View
sry.....not this one...it should find whether it is newuser or currentuser?
sathiyak
5-Dec-11 2:10am
View
Error 1 No overload for method 'TryParse' takes '1' arguments..........it comes
sathiyak
3-Dec-11 2:30am
View
helo...i m not reposting.....
sathiyak
3-Dec-11 2:09am
View
i dont want to calculate at the footer...
sathiyak
3-Dec-11 1:53am
View
row values........yes i want to calculate totalprice but not in footer outer grid....
sathiyak
3-Dec-11 1:27am
View
protected void totalprice()
{
int quantity = 0;
float price = 0;
float rowTotal = 0;
float subTotal = 0;
float totalprice = 0;
foreach (GridViewRow row in GridView1.Rows)
{
rowTotal = quantity * price;
subTotal += rowTotal;
price = float.Parse((((Label)row.FindControl("price")).Text));
quantity = Convert.ToInt32((((Label)row.FindControl("txtquantity")).Text));
totalprice = subTotal;
}
lbltprice.Text = totalprice.ToString();
}
it shows error like"Object reference not set to an instance of an object."
sathiyak
3-Dec-11 1:04am
View
quantity = Convert.ToInt32(row.Cells[3].Text); //here
sathiyak
3-Dec-11 1:03am
View
Deleted
thanks.
sathiyak
2-Dec-11 4:25am
View
again same err only.....
sathiyak
2-Dec-11 4:06am
View
again same error only.............
sathiyak
2-Dec-11 3:58am
View
Error 3 Cannot implicitly convert type 'float' to 'System.Web.UI.WebControls.Label'
this comes................
sathiyak
1-Dec-11 1:10am
View
formula.........
sathiyak
1-Dec-11 0:36am
View
i have price,quantity in table.....but dont know how to calculate netprice...
sathiyak
30-Nov-11 3:23am
View
ok....understood...
sathiyak
28-Nov-11 22:48pm
View
now i have solved that problem........tks
sathiyak
26-Nov-11 0:26am
View
cant understood.........
sathiyak
24-Nov-11 3:12am
View
here i have create the stored procedure but in the add cart button i use this sp but for addcart i have no forms.....pls can anyone understand?
sathiyak
24-Nov-11 0:44am
View
here all is fine but for the image we cant give like"pro_img.Text= dr[7].ToString();"it is wrong........i want soln for that one.....instead of text we shoule give other one.......
sathiyak
24-Nov-11 0:11am
View
Deleted
for this i got soln but dont know how to do for image...
sathiyak
23-Nov-11 23:39pm
View
i have 21 colums exactly..but error comes like this....
sathiyak
23-Nov-11 23:21pm
View
in my database the index position of price is 20 but when i give dr[20] it shows error.....
sathiyak
23-Nov-11 4:16am
View
anyone give soln........
sathiyak
23-Nov-11 3:59am
View
again it shows error only...dont know can u help?
sathiyak
23-Nov-11 1:28am
View
it shows " The resource cannot be found".....
sathiyak
22-Nov-11 3:10am
View
i gave condition as string......
sathiyak
22-Nov-11 2:56am
View
Deleted
ok
sathiyak
21-Nov-11 3:46am
View
Deleted
i have alredy added that price also..
sathiyak
21-Nov-11 3:42am
View
sorry again it shows the same error...in the first line...
sathiyak
21-Nov-11 3:39am
View
Deleted
excuse me in that coding in a condition line it shows like input string should be in correct format...i dont know...i m asking that one...
sathiyak
17-Nov-11 23:32pm
View
sorry....hereafter i takecare...
sathiyak
12-Nov-11 0:57am
View
where we should
write this..........
sathiyak
12-Nov-11 0:41am
View
i cant understood clearly
Show More