|
fattycode wrote: to save images in host but it doesn't save image on host.
What does it mean ? Are you getting any error ? or what ?
You are talking about Hosting on IIS or Running your Application From Visual Studio ?
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
I have my webproject in host and i had problem with premissions,I made premission changes on control panel and now is working good.
Thanks for your time.
|
|
|
|
|
fattycode wrote: I made premission changes on control panel
Yes ! That's why I asked you the question, what is the problem if you are hosting on server, you have to give Write Access permission to that folder where you are uploadinf the file.
fattycode wrote: now is working good.
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
hi am quite new to programming and am trying my hands on some codes i copied from the net but am facing these problems
"
Error 1 Program 'C:\Users\Nancy\Documents\Visual Studio 2008\Projects\softwaree\softwaree\obj\Debug\softwaree.exe' has more than one entry point defined: 'softwaree.Program.Main()'. Compile with /main to specify the type that contains the entry point. C:\Users\Nancy\Documents\Visual Studio 2008\Projects\softwaree\softwaree\Program.cs 14 21 softwaree
AND
Error 2 Program 'C:\Users\Nancy\Documents\Visual Studio 2008\Projects\softwaree\softwaree\obj\Debug\softwaree.exe' has more than one entry point defined: 'softwaree.Form2.Main()'. Compile with /main to specify the type that contains the entry point. C:\Users\Nancy\Documents\Visual Studio 2008\Projects\softwaree\softwaree\Form2.cs 53 17 softwaree
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
namespace softwaree
{
public partial class Form2 : Form
{
SqlConnection cn = new SqlConnection("data source=.;database=biblio;uid=admin;pwd=pw");
SqlDataAdapter da = new SqlDataAdapter();
string strSQL = "Select Title, PubID from Titles";
SqlCommand cmd;
SqlDataReader Dr;
System.Windows.Forms.Button Button2 = new System.Windows.Forms.Button();
System.Windows.Forms.ListBox ListBox2 = new System.Windows.Forms.ListBox();
System.Windows.Forms.TextBox TextBox2 = new System.Windows.Forms.TextBox();
public Form2()
{
cmd = new SqlCommand(strSQL, cn);
this.SuspendLayout();
this.Button2.Location = new System.Drawing.Point(136, 248);
this.Button2.Size = new System.Drawing.Size(144, 32);
this.Button2.Text = "Get Data";
this.Button2.Click += new System.EventHandler(this.Button1_Click);
this.ListBox2.Location = new System.Drawing.Point(48, 64);
this.ListBox2.Size = new System.Drawing.Size(312, 160);
this.TextBox2.Location = new System.Drawing.Point(48, 24);
this.TextBox2.Size = new System.Drawing.Size(328, 20);
this.TextBox2.Text = "Hit";
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(408, 293);
this.Controls.AddRange(new System.Windows.Forms.Control[] {
this.Button2,
this.ListBox2,
this.TextBox2});
this.ResumeLayout(false);
}
[STAThread]
static void Main() {
Application.Run(new Form2());
InitializeComponent();
}
private void Form2_Load(object sender, EventArgs e)
{
}
private void button2_Click(object sender, EventArgs e)
{
cn.Open();
cmd.CommandText = strSQL + "'" + TextBox1.Text + "%'";
Dr = cmd.ExecuteReader();
ListBox1.Items.Clear();
ListBox1.BeginUpdate();
while (Dr.Read()){
ListBox1.Items.Add(Dr.GetString(0) + " - " + Dr.GetInt32(1).ToString());
}
ListBox1.EndUpdate();
Dr.Close();
}
}
}
|
|
|
|
|
Always rememebr this rule of thumb:
Everyapplication can have one and only one Main function.
Search in your code, it looks that there are multiple main functions are defined.
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
This has nothing at all to do with ASP.NET. You want the C# forum. You should work through a basic book rather than trying to copy code off the web.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
I have a dataset in which is data is comming from two table coresponding id
ad = new SqlDataAdapter("select cityid,cityname,stdcode,statename from cities,States where cities.stateid=states.stateid", con.cn);
ad.fill(ds,"Temp");
GridView1.DataSource =ds.Tables["Temp");
GridView1.DataBind();
but Right now I Want to filter dataset according to textbox value Colmun Wise who will enter by user.
we can filter data directly from table but I want to filter data from dataset. give me help or sugesstion. Thnks.....
|
|
|
|
|
|
It is not working. there are more than one textboxes and user can enter value more than one textboxes according to colmuns
|
|
|
|
|
You can change filter expression for Select of dataset as per our values.
|
|
|
|
|
But it is giving error object refrence is no set an instance in secondline while colmun is ok and also creare memory for dataset
DataRow[] R;
R =ds.Tables["tmp"].Select("cityname ='" + TextBox6.Text + "'");//Error
GridView1.DataSource = R;
GridView1.DataBind();
|
|
|
|
|
I think something you did wrong in code.Plz check stack trace and find out whats causing the pblm.
|
|
|
|
|
hai i have one doubt i m using substring in for to display only 10 characters
i m fetching data from database.. column name called description
and now i want to substring of that desciption colunm , write code in c#.
and i wrote code for that like this
lbl_sub.Text = lbl_sub.Text.Substring(0,5-0).ToString() + "..";
this coding working but my problem is when i m fetching .. if there is no data in database ..the n i m getting error. if data lessthan 5 characters then also i m getting error..
plz could u tell me how can i do this ..
try and try untill reach success..
|
|
|
|
|
try this,
if(!string.IsNullOrEmpty(lbl_sub.Text))
{
lbl_sub.Text = (lbl_sub.Text.Length > 5) ? lbl_sub.Text.Substring(0, 5) : lbl_sub.Text;
}
|
|
|
|
|
Thanks dude its working ..thanks a lot ..
do u know how can i change color of that description column data nad disply into different color.
try and try untill reach success..
|
|
|
|
|
|
Rajeshwar Code- Developer wrote: do u know how can i change color of that description column data nad disply into different color.
You are displaying it in a label.right?
Then just give color for label.
|
|
|
|
|
no no i m not displaying in label ..just that is for ex..
actaully how can i substring for dataset.
i m displaying in treeview.
try and try untill reach success..
|
|
|
|
|
If you are using treeview you can do it while adding the nodes to treeview.
|
|
|
|
|
i enable to unserstand how can i so it..
only just tell me ..
ds.tables[0].rows[0]["desc"].tostring;
i fetch data from database now my desc column data it is in ds ..right
plzz could u tell me how can i do substring and change the color..
try and try untill reach success..
|
|
|
|
|
Where you want to display that description.As treeview node?
You have multiple rows.Where you want to change the color?because every node having description.
|
|
|
|
|
yes i want to change every row of the description...
try and try untill reach success..
|
|
|
|
|
Rajeshwar Code- Developer wrote: yes i want to change every row of the description...
style treeview.
|
|
|
|
|
Hello
I download A client server Application from code project.
I want to access server application through internet
Thankyou
|
|
|
|
|
Better you learn from a book or online resources.Plz just try yourself some basics.Everybody started as beginners.
manish.m.meshram wrote: I want to access server application through internet
You need to host the application.
|
|
|
|