|
Hi All
I am developing a web application with master page. I am specifying the doc type in the master page.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
i am using css to specify the width and height for the controls am using in the aspx pages
but they r not setting the height and width am specifying in css.
if i remove the doctype in master page then height and width attributes are setting correctly. but i need the doctype in my master page.
Please help me how to come out of this.
Thanks in advance
Regards
Naina
|
|
|
|
|
Hi to all,
Sorry to disturb you again. I am developing a website and after making it 70% I published it and made it online. It was working fine. Now I added a new page today and published it. Now that page is giving this error:
Server Error in '/VICTORIAIN' Application.
Invalid object name 'STATIC'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.SqlClient.SqlException: Invalid object name 'STATIC'.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[SqlException (0x80131904): Invalid object name 'STATIC'.]
System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +925466
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +800118
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +186
System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +1932
System.Data.SqlClient.SqlDataReader.ConsumeMetaData() +31
System.Data.SqlClient.SqlDataReader.get_MetaData() +62
System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +297
System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +1005
System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +132
System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) +32
System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) +122
System.Data.SqlClient.SqlCommand.ExecuteReader() +84
_Default.BenefitsData() +125
_Default.Page_Load(Object sender, EventArgs e) +10
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +15
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +33
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +47
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1436
Version Information: Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433
I googled and found that I should set up the database again. So I created the database again and restored it with the backup. Now the whole site is not opening with the error above.
Can anybody help me on this?
cheers,
sneha
|
|
|
|
|
I would guess that you've created an object in your DB called 'static', and that this name is not valid. Do you have any objects called that, in your code or your DB ?
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
Hi,
Thank you for replying. Actually there is a table named "STATIC" from which the home page data is coming. Does the problem is with the name "STATIC".
As I said that earlier it was working fine except the one page I added. On that page the data was coming from the table named "STATIC" and the column name was "Career". That time the error on that page was similar to the present error except the heading "Invalid column name "Career"" instead of "Invalid object name "STATIC""
cheers,
sneha
|
|
|
|
|
Well, that seems to clear up the mystery. Either it's an invalid name, or you're somehow failing to scope it properly.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
sneha Choudhary wrote: I googled and found that I should set up the database again.
I am really curious to know what did you googled.
Show some code how you are trying to access the table. That would help.
|
|
|
|
|
d@nish wrote: Show some code how you are trying to access the table. That would help.
I changed the table name "STATIC" to "STATICDATA" and the code is:
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if(!Page.IsPostBack)
{
BenefitsData();
WelcomeData();
list_of_courses();
Latest_News();
}
}
public void WelcomeData()
{
SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["newcon"].ConnectionString);
SqlCommand cmd = new SqlCommand();
cmd.Connection = con;
cmd.CommandText = "select Welcome from dbo.STATICDATA";
cmd.Connection.Open();
SqlDataReader rdr = cmd.ExecuteReader();
while (rdr.Read())
{
string welcome_text = rdr["welcome"].ToString();
LblWelcomeText.Text = welcome_text;
}
cmd.Connection.Close();
}
public void BenefitsData()
{
SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["newcon"].ConnectionString);
SqlCommand cmd = new SqlCommand();
cmd.Connection = con;
cmd.CommandText = "select Benefits from dbo.STATICDATA";
cmd.Connection.Open();
SqlDataReader rdr = cmd.ExecuteReader();
while (rdr.Read())
{
string benefits_text = rdr["Benefits"].ToString();
LblBenefits.Text = benefits_text;
}
cmd.Connection.Close();
}
public void Latest_News()
{
SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["newcon"].ConnectionString);
SqlCommand cmd = new SqlCommand();
cmd.Connection = con;
cmd.CommandText = "select top 1 headline,submit_time from dbo.NEWS order by submit_time desc";
cmd.Connection.Open();
SqlDataReader rdr = cmd.ExecuteReader();
while (rdr.Read())
{
string head = rdr["headline"].ToString();
LblMainHeadline.Text = head;
string dat = rdr["submit_time"].ToString();
LblDate.Text = dat;
}
cmd.Connection.Close();
}
public void list_of_courses()
{
SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["newcon"].ConnectionString);
SqlCommand cmd = new SqlCommand();
cmd.Connection = con;
cmd.CommandText = "select course_name,pdf_file from dbo.COURSES";
SqlDataAdapter sda = new SqlDataAdapter(cmd);
DataTable dt = new DataTable();
con.Open();
sda.Fill(dt);
DataView dview = dt.DefaultView;
DataCourses.DataSource = dview;
DataCourses.DataBind();
con.Close();
}
}
cheers,
sneha
|
|
|
|
|
Have you ever thought about structuring your code ? For example, having a data layer, and perhaps even a shared connection ?
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
1. Check whether the table exists in the database which is pointed by the connection string 'newcon'.
2. If table exists, check whether the table is created with the schema dbo. i.e., your table name must be created by dbo.STATICDATA. Because you are selecting records using syntax schemaname.TABLENAME. If the table is created with different schema, then you will get this error.
|
|
|
|
|
Can you show us in your code where you use the Word Static ? Try to pout a break point on that page and show us where you get an error
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.somee.com
http://www.vuyiswamaseko.tiyaneProperties.co.za
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
Hi to all,
Thank you all of you for replying me and giving me the way, how to code in a better way.
My problem is solved. Found two mistakes in my code.
1. There was no closing semi bracket in one of the page. But it didn't gave any error on localhost. I don't know why.
2.There was a lot of commented code on the pages. I removed all of that.And I coded by giving a shared connection and used regions in my code. I don't know it could be a reason or not.
Then I again published and uploaded. And it worked.
Thank you for guiding me on the path of being good developer.
cheers,
sneha
|
|
|
|
|
Error: Client doesn't support authentication Protocol...
from
India Real Estate| Website Development
|
|
|
|
|
Is there a question here ?
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
estatekhoj wrote: Error: Client doesn't support authentication Protocol...
What is that ? What is you question?
|
|
|
|
|
his issue is he can't read, so he keeps asking until someone reads his mind.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
can anybody help me about this subject?plz
|
|
|
|
|
|
Hello Friend,
actually i am developing a Intranet application.i want to get all system of Hardware configuration & software details using WMI through Client Ip address. actually i got all Ip Address of system through Ping.and i want to know Hardware Configuration of system & Installed Software Details according to IP Address.
Thanks & Regards
raushan
|
|
|
|
|
This is not really an ASP.NET question. ASP.NET could not do this, this will only work because you're on an intranet and can do it through your network, in theory.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
Ye, you r right, then how i will get Hardware & Software Details through network. Because i have need only in my organization network.
Please give some idea to do in Intranet....
Thanks & Regards
raushan
|
|
|
|
|
I'm suggesting this is the wrong forum, and you should ask in the C# forum. I don't actually know the answer, I'm telling you the best place to find it.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
Hi,
I have html textbox and html listbox. If i type a letter in textbox corresponding names are populated to listbox.
After that i need to set the focus to my listbox when i press downarrow.
I am trying to implement this using onkeyup event by writing the follwing code:
if(key == 40)
{
//document.getElementById("ddlForResult").options(0).focus();
document.getElementById("ddlForResult").options[0].selected = true;
// var myControl = document.getElementById("ddlForResult");
// myControl.focus();
// myControl.select();
//document.getElementById("ddlForResult").selectedIndex = 0;
}
But the focus is not set into first element of listbox.
I dont know where i did a mistake, If anybody knows the solution for this please let me know....
|
|
|
|
|
dayakar_dn wrote: ddlForResult
Is this the client side name for the control ? If it's a server control, then use the ClientID property to get the client side id.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
In my page, I have a wizard control. Inside a Wizard control, there is only one textbox which checks for an unique document number. When the user types a document number in the textbox, I am checking whether it already exists in the database. if exists, I want to show a warning saying that this will be a revision of existing document.
User can either accept or reject this. How can I do this confirmation on the click on Next button of Wizard Control? I don't want to use a javascript for this. Is there any other way which i can achieve this? Please help.
Success is the good fortune that comes from aspiration, desperation, perspiration and inspiration.
|
|
|
|
|
meeram395 wrote: I don't want to use a javascript for this
Well, you have no choice, unless you want to do a page refresh, to show a new page that asks the user to confirm, then posts back to load whatever page was requested.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|