15,999,290 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 Member 10467514 (Top 33 by date)
Member 10467514
1-Jan-14 0:43am
View
Thanku for all ,...it is still not working and showing error to add custom error page,i did it then also showing the same error...
Member 10467514
31-Dec-13 9:14am
View
it showing error near <system.webserver></system.webserver>
Member 10467514
31-Dec-13 9:13am
View
Deleted
it showing error near <system.webserver>
Member 10467514
30-Dec-13 3:25am
View
Now it shows like this:
HTTP Error 403.14 - Forbidden
The Web server is configured to not list the contents of this directory.
Detailed Error Information
Module DirectoryListingModule
Notification ExecuteRequestHandler
Handler StaticFile
Error Code 0x00000000
Most likely causes:
A default document is not configured for the requested URL, and directory browsing is not enabled on the server.
Things you can try:
If you do not want to enable directory browsing, ensure that a default document is configured and that the file exists.
Enable directory browsing using IIS Manager.
Open IIS Manager.
In the Features view, double-click Directory Browsing.
On the Directory Browsing page, in the Actions pane, click Enable.
Verify that the configuration/system.webServer/directoryBrowse@enabled attribute is set to true in the site or application configuration file.
Links and More Information
This error occurs when a document is not specified in the URL, no default document is specified for the Web site or application, and directory listing is not enabled for the Web site or application. This setting may be disabled on purpose to secure the contents of the server.
I placed a default.aspx page in the website.then why it is showing like this.........
Member 10467514
30-Dec-13 2:26am
View
i added this line in my web.config
<configuration>
<system.web>
<customerrors mode="RemoteOnly" defaultredirect="mycustompage.htm">
then also it showing the same error
Member 10467514
29-Dec-13 8:09am
View
can't we give its ID.?if it works.........
Member 10467514
29-Dec-13 3:32am
View
<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="joblist.aspx.cs" Inherits="joblist" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<p>
<asp:GridView ID="GridView1" runat="server"
AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False"
CellPadding="4" DataKeyNames="JobID" DataSourceID="SqlDataSource1"
Width="426px" ForeColor="#333333" GridLines="None">
<alternatingrowstyle backcolor="White" forecolor="#284775">
<columns>
<asp:CommandField ShowSelectButton="True" />
<asp:BoundField DataField="CompanyName" HeaderText="CompanyName"
SortExpression="CompanyName" />
<asp:BoundField DataField="JobID" HeaderText="JobID"
SortExpression="JobID" InsertVisible="False" ReadOnly="True" />
<asp:BoundField DataField="Designation" HeaderText="Designation"
SortExpression="Designation" />
<editrowstyle backcolor="#999999">
<footerstyle backcolor="#5D7B9D" forecolor="White" font-bold="True">
<HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
<PagerStyle BackColor="#284775" ForeColor="White"
HorizontalAlign="Center" />
<rowstyle forecolor="#333333" backcolor="#F7F6F3">
<SelectedRowStyle BackColor="#E2DED6" ForeColor="#333333" Font-Bold="True" />
<sortedascendingcellstyle backcolor="#E9E7E2">
<sortedascendingheaderstyle backcolor="#506C8C">
<sorteddescendingcellstyle backcolor="#FFFDF8">
<sorteddescendingheaderstyle backcolor="#6F8DAE">
</p>
<p>
<asp:DetailsView ID="DetailsView1" runat="server" AutoGenerateRows="False"
CellPadding="2" DataKeyNames="JobID" DataSourceID="SqlDataSource2"
ForeColor="Black" GridLines="None" Height="50px" Width="300px"
BackColor="LightGoldenrodYellow" BorderColor="Tan" BorderWidth="1px">
<alternatingrowstyle backcolor="PaleGoldenrod">
<editrowstyle backcolor="DarkSlateBlue" forecolor="GhostWhite">
<fields>
<asp:BoundField DataField="JobID" HeaderText="JobID" InsertVisible="False"
ReadOnly="True" SortExpression="JobID" />
<asp:BoundField DataField="CompanyName" HeaderText="CompanyName"
SortExpression="CompanyName" />
<asp:BoundField DataField="Designation" HeaderText="Designation"
SortExpression="Designation" />
<asp:BoundField DataField="EducationalQualification"
HeaderText="EducationalQualification"
SortExpression="EducationalQualification" />
<asp:BoundField DataField="Experience" HeaderText="Experience"
SortExpression="Experience" />
<asp:BoundField DataField="State" HeaderText="State" SortExpression="State" />
<asp:BoundField DataField="Country" HeaderText="Country"
SortExpression="Country" />
<asp:TemplateField HeaderText="Select here to apply for this job">
<itemtemplate>
<asp:CheckBox ID="CheckBox1" runat="server" />
<footerstyle backcolor="Tan">
<HeaderStyle BackColor="Tan" Font-Bold="True" />
<PagerStyle BackColor="PaleGoldenrod" ForeColor="DarkSlate
Member 10467514
29-Dec-13 3:28am
View
no
Member 10467514
28-Dec-13 0:52am
View
anyone can correct my code above? it showing error as invalid operationException was unhandled by usercode .Both Datasource and datasourceID are defined on Detailsview1.remove one definition.i am totally new so anyone can help me...
Member 10467514
26-Dec-13 6:18am
View
in the above code
Member 10467514
26-Dec-13 5:55am
View
Invalid OperationException was unhandled by usercode
Both DataSource and DataSourceID are defined on 'DetailsView1'. Remove one definition.
Member 10467514
26-Dec-13 5:46am
View
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
public partial class joblist : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!this.IsPostBack)
{
DataTable dt = new DataTable();
dt.Columns.AddRange(new DataColumn[2] { new DataColumn("CompanyName"), new DataColumn("Designation") });
dt.Rows.Add("NIIT", "programmer");
dt.Rows.Add("annvision", "Webdesigner");
dt.Rows.Add("softtech", "designer");
dt.Rows.Add("Mahad", "Programmer");
DetailsView1.DataSource = dt;
DetailsView1.DataBind();
}
}
protected void Button1_Click(object sender, EventArgs e)
{
Response.Redirect("~/secure.aspx");
}
protected void Page_PreRender(object sender, EventArgs e)
{
if (GridView1.SelectedRow == null)
{
DetailsView1.Visible = false;
}
else
{
DetailsView1.Visible = true;
}
}
protected void Apply_Click(object sender, EventArgs e)
{
Response.Write("You are successfully applied");
DataTable dt = new DataTable();
dt.Columns.AddRange(new DataColumn[2] { new DataColumn("CompanyName"), new DataColumn("Designation") });
foreach (DetailsViewRow row in DetailsView1.Rows)
{
if (row.RowType == DataControlRowType.DataRow)
{
CheckBox chkRow = (row.Cells[0].FindControl("chkRow") as CheckBox);
if (chkRow.Checked)
{
string CompanyName = row.Cells[1].Text;
string Designation = (row.Cells[2].FindControl("lblDesignation") as Label).Text;
dt.Rows.Add(CompanyName, Designation);
}
}
}
GridView2.DataSource = dt;
GridView2.DataBind();
}
}
it showing error near detailview1.DataBind();
Member 10467514
26-Dec-13 0:47am
View
Thanku so much sir it is working......
Member 10467514
25-Dec-13 9:29am
View
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
using System.Configuration;
using System.Data;
public partial class viewcompanyprofile : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click1(object sender, EventArgs e)
{
SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["CRegConnectionString"].ConnectionString);
string query = "select * from CompanyProfile where CompanyName = @CompanyName";
SqlCommand cmd = new SqlCommand(query, con);
cmd.Parameters.Add(new SqlParameter("@CompanyName", TextBox9cmpynam.Text.Trim()));
SqlDataAdapter da = new SqlDataAdapter(cmd);
DataSet ds = new DataSet();
try
{
da.Fill(ds, "CompanyProfile");
if (ds != null && ds.Tables["CompanyProfile"] != null && ds.Tables["CompanyProfile"].Rows.Count > 0)
{
Panel1.Visible = true;
TextBox1cmpynm.Text = ds.Tables["CompanyProfile"].Rows[0]["CompanyName"].ToString();
TextBox2briefprofle.Text = ds.Tables["CompanyProfile"].Rows[0]["BriefProfile"].ToString();
TextBox3addr.Text = ds.Tables["CompanyProfile"].Rows[0]["Address"].ToString();
TextBox4state.Text = ds.Tables["CompanyProfile"].Rows[0]["State"].ToString();
TextBox5country.Text = ds.Tables["CompanyProfile"].Rows[0]["Country"].ToString();
TextBox6phno.Text = ds.Tables["CompanyProfile"].Rows[0]["PhoneNo"].ToString();
TextBox7website.Text = ds.Tables["CompanyProfile"].Rows[0]["Website"].ToString();
TextBox8emailid.Text = ds.Tables["CompanyProfile"].Rows[0]["EmailID"].ToString();
con.Close();
}
else
{
Panel1.Visible = false;
}
}
catch (Exception er)
{
Response.Write("Something really bad happend .....Please try again");
}
}
}
Member 10467514
25-Dec-13 9:20am
View
showing that something really bad happend.....if i remove the try catch ,then it is throwing an exception that brief profile is not there in the table companyprofile....why it is showing like this?
Member 10467514
25-Dec-13 9:10am
View
all column names are correctly spelled then also it is not showing the data...
Member 10467514
25-Dec-13 6:07am
View
now it is showing value only in the company name textbox...
my page is shown below
CompanyName (here is one textbox)
view my profile(button)
CompanyName (textbox)
BreifProfile (textbox)
Address (textbox)
State (textbox)
Country (textbox)
PhoneNo(textbox)
Website (textbox)
EmailID(textbox)
here when we click view button only Company Name is displaying...other textboxes are showing empty...
Member 10467514
25-Dec-13 4:02am
View
sorry to tell that....it showing the panel containing textbox but not showing the correspoding company name profile details in textbox.textbox is showing empty.....
Member 10467514
25-Dec-13 3:33am
View
Query Analyzer??...I am A fresher in this field.......
Member 10467514
25-Dec-13 3:31am
View
can you please say how to add a checkbox to the exsisting gridview.........
Member 10467514
25-Dec-13 3:16am
View
when i added the above command it shows error
sql exception handled
you must declare the @CompanyName
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
using System.Configuration;
using System.Data;
public partial class viewcompanyprofile : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click1(object sender, EventArgs e)
{
SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["CRegConnectionString"].ConnectionString);
SqlCommand com = new SqlCommand("select * from CompanyProfile where CompanyName'" + TextBox9cmpynam.Text + "'", con);
SqlDataAdapter da = new SqlDataAdapter(com);
con.Open();
DataSet ds = new DataSet();
string query = "select count(*) from CompanyProfile where CompanyName=@CompanyName";
SqlCommand cmd = new SqlCommand(query, con);
cmd.Parameters.AddWithValue("@CompanyName", TextBox9cmpynam.Text);
SqlCommand User = new SqlCommand(query, con);
int temp = Convert.ToInt32(User.ExecuteScalar().ToString());
con.Close();
if (temp == 1)
{
try
{
Panel1.Visible = true;
com.ExecuteNonQuery();
da.Fill(ds, "CompanyProfile");
TextBox1cmpynm.Text = ds.Tables["CompanyProfile"].Rows[0]["CompanyName"].ToString();
TextBox2briefprofle.Text = ds.Tables["CompanyProfile"].Rows[0]["BriefProfile"].ToString();
TextBox3addr.Text = ds.Tables["CompanyProfile"].Rows[0]["Address"].ToString();
TextBox4state.Text = ds.Tables["CompanyProfile"].Rows[0]["State"].ToString();
TextBox5country.Text = ds.Tables["CompanyProfile"].Rows[0]["Country"].ToString();
TextBox6phno.Text = ds.Tables["CompanyProfile"].Rows[0]["PhoneNo"].ToString();
TextBox7website.Text = ds.Tables["CompanyProfile"].Rows[0]["Website"].ToString();
TextBox8emailid.Text = ds.Tables["CompanyProfile"].Rows[0][""].ToString();
con.Close();
}
catch (Exception er)
{
Response.Write("
Something really bad happend .....Please try again
");
}
}
else
{
Panel1.Visible = false;
}
}
}
Member 10467514
24-Dec-13 6:47am
View
when i created checkbox, as says in the above link it showing error in the gridview in design part...can you please tell how to add a checkbox to exsisting datagridview....
Member 10467514
24-Dec-13 6:45am
View
i already created gridview .how can i add checkbox to that gridview.and also please give me the code to move the selected row from the current table to another table.please give explaination as command
Member 10467514
24-Dec-13 6:41am
View
i need to display the companyprofile created by a company whem a employer type his username and click on view company profile button.I need to check the username and display the company profile. i written the code as below... but it showing some error.please correct the error...
connectionstring : RegConnectionString
TableName;CompanyProfile
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
using System.Configuration;
using System.Data;
public partial class viewcompanyprofile : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["CRegConnectionString"].ConnectionString);
SqlCommand com = new SqlCommand("select * from CompanyProfile", con);
System.Data.SqlClient.SqlDataAdapter da = new System.Data.SqlClient.SqlDataAdapter(com);
con.Open();
string uname = com.ExecuteScalar().ToString();
DataSet ds = new DataSet();
if (uname == TextBox9usernam.Text)
{
try
{
com.ExecuteNonQuery();
da.Fill(ds, "CompanyProfile");
con.Close();
TextBox1cmpynm.Text = ds.Tables["CompanyProfile"].Rows[0]["CompanyName"].ToString();
TextBox2briefprofle.Text = ds.Tables["CompanyProfile"].Rows[0]["BriefProfile"].ToString();
TextBox3addr.Text = ds.Tables["CompanyProfile"].Rows[0]["Address"].ToString();
TextBox4state.Text = ds.Tables["CompanyProfile"].Rows[0]["State"].ToString();
TextBox5country.Text = ds.Tables["CompanyProfile"].Rows[0]["Country"].ToString();
TextBox6phno.Text = ds.Tables["CompanyProfile"].Rows[0]["PhoneNo"].ToString();
TextBox7website.Text = ds.Tables["CompanyProfile"].Rows[0]["Website"].ToString();
TextBox8emailid.Text = ds.Tables["CompanyProfile"].Rows[0]["EmailID"].ToString();
con.Close();
}
catch (Exception er)
{
Response.Write("Something really bad happend .....Please try again");
}
}
else
{
Response.Write("some problem");
}
}
}
it is not showing error .and also it is not fetching data and displaying it the textbox...
i give
Company Name:(TextBox)
brief details:(TextBox)
Improve question Permalink
Member 10467514
24-Dec-13 4:36am
View
this error msg shown near con.open();
Member 10467514
24-Dec-13 4:02am
View
I addded the con.open(); above the string uname =......
and then debugg it shows again an error.my database name is database.mdf
An attempt to attach an auto-named database for file C:\Users\IT\Documents\Visual Studio 2010\WebSite\Website nw\App_Data\Databasenw.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.
Member 10467514
24-Dec-13 4:01am
View
Deleted
I addded the con.open(); above the string uname =......
and then debugg it shows again an error.my database name is database.mdf
An attempt to attach an auto-named database for file C:\Users\IT\Documents\Visual Studio 2010\WebSite\Website nw\App_Data\Databasenw.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.
Member 10467514
24-Dec-13 3:54am
View
inside the view profile button i written these codes
Member 10467514
24-Dec-13 3:53am
View
i made a textbox to enter username.after that i placed the view profile button.to check the user i placed the if(uname....)
Member 10467514
24-Dec-13 3:37am
View
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
using System.Configuration;
using System.Data;
public partial class viewcompanyprofile : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["RegConnectionString"].ConnectionString);
SqlCommand com = new SqlCommand("select * from CompanyProfile", con);
System.Data.SqlClient.SqlDataAdapter da = new System.Data.SqlClient.SqlDataAdapter(com);
string uname = com.ExecuteScalar().ToString();
DataSet ds = new DataSet();
if (uname == TextBox9usernam.Text)
{
try
{
con.Open();
com.ExecuteNonQuery();
da.Fill(ds, "CompanyProfile");
con.Close();
TextBox1cmpynm.Text = ds.Tables["CompanyProfile"].Rows[0]["CompanyName"].ToString();
TextBox2briefprofle.Text = ds.Tables["CompanyProfile"].Rows[0]["BriefProfile"].ToString();
TextBox3addr.Text = ds.Tables["CompanyProfile"].Rows[0]["Address"].ToString();
TextBox4state.Text = ds.Tables["CompanyProfile"].Rows[0]["State"].ToString();
TextBox5country.Text = ds.Tables["CompanyProfile"].Rows[0]["Country"].ToString();
TextBox6phno.Text = ds.Tables["CompanyProfile"].Rows[0]["PhoneNo"].ToString();
TextBox7website.Text = ds.Tables["CompanyProfile"].Rows[0]["Website"].ToString();
TextBox8emailid.Text = ds.Tables["CompanyProfile"].Rows[0]["EmailID"].ToString();
con.Close();
}
catch (Exception er)
{
Response.Write("
Something really bad happend .....Please try again
");
}
}
else
{
Response.Write("
some problem
");
}
}
}
"InvalidoperationException was unhandled by usercode
ExecuteScalar requires an open and available connection .The connection's current state is closed"
Member 10467514
24-Dec-13 3:37am
View
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
using System.Configuration;
using System.Data;
public partial class viewcompanyprofile : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["RegConnectionString"].ConnectionString);
SqlCommand com = new SqlCommand("select * from CompanyProfile", con);
System.Data.SqlClient.SqlDataAdapter da = new System.Data.SqlClient.SqlDataAdapter(com);
string uname = com.ExecuteScalar().ToString();
DataSet ds = new DataSet();
if (uname == TextBox9usernam.Text)
{
try
{
con.Open();
com.ExecuteNonQuery();
da.Fill(ds, "CompanyProfile");
con.Close();
TextBox1cmpynm.Text = ds.Tables["CompanyProfile"].Rows[0]["CompanyName"].ToString();
TextBox2briefprofle.Text = ds.Tables["CompanyProfile"].Rows[0]["BriefProfile"].ToString();
TextBox3addr.Text = ds.Tables["CompanyProfile"].Rows[0]["Address"].ToString();
TextBox4state.Text = ds.Tables["CompanyProfile"].Rows[0]["State"].ToString();
TextBox5country.Text = ds.Tables["CompanyProfile"].Rows[0]["Country"].ToString();
TextBox6phno.Text = ds.Tables["CompanyProfile"].Rows[0]["PhoneNo"].ToString();
TextBox7website.Text = ds.Tables["CompanyProfile"].Rows[0]["Website"].ToString();
TextBox8emailid.Text = ds.Tables["CompanyProfile"].Rows[0]["EmailID"].ToString();
con.Close();
}
catch (Exception er)
{
Response.Write("
Something really bad happend .....Please try again
");
}
}
else
{
Response.Write("
some problem
");
}
}
}
i added that code and make some changes.then it showed the error
"InvalidoperationException was unhandled by usercode
ExecuteScalar requires an open and available connection .The connection's current state is closed"
Member 10467514
24-Dec-13 1:08am
View
can you please say how to do that with example
Member 10467514
19-Dec-13 7:25am
View
need to create a user profile....please give me a code to view user profile from registration page
Show More