|
Internet Explorer seems to have some hard-bound limit of number of style definitions a page can have. A quick Google search gave me the number as 31 (http://john.albin.net/css/ie-stylesheets-not-loading[^]). But I don't think my page is hitting this limit.
The problem is not present in Chrome/FF. Anyone ran into a similar issue?
Browser: IE 9
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
The woods are lovely, dark and deep,
But I have promises to keep,
And miles to go before I sleep,
And miles to go before I sleep!
|
|
|
|
|
Is there question here?
If you need more than 31 CSS files for your application then you should rethink the design or use better CSS.
Failure is not an option; it's the default selection.
|
|
|
|
|
Is there a reason for this 31 only for Internet Explorer when W3C standards or other browsers do not stipulate one?
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
The woods are lovely, dark and deep,
But I have promises to keep,
And miles to go before I sleep,
And miles to go before I sleep!
|
|
|
|
|
Because 30 was too few and 32 too many. Or maybe the team felt if you needed that many CSS files you should be designing webpages.
Failure is not an option; it's the default selection.
|
|
|
|
|
SQL Server has a recursion limit of 32 and they impose a similar range in stylesheets too!
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
The woods are lovely, dark and deep,
But I have promises to keep,
And miles to go before I sleep,
And miles to go before I sleep!
|
|
|
|
|
...but then a really dim person asking!
I see that default.aspx will be the 'index' page, but I am using default.cshtml.
(There is also default.vbhtml).
Is there any real difference, or do the browsers only pick up on the DEFAULT bit?
(Or are they well trained enough to pick up the extensions and treat them differently?)
---------------------------------
I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave
CCC Link[ ^]
English League Tables - Live
|
|
|
|
|
The default page has nothing to do with the browser. Basically, what happens is that the browser sends a request through to the web server - if no web page is specified, it looks through the list of default pages it has registered, and opens up that page; note that there is a priority here, so if you have default.htm as a higher priority than default.aspx in the web server, and you have both pages available at that level of the website, default.htm will be opened.
|
|
|
|
|
Right, thanks.
It is a server side decision, not a client's browser then.
I must remember to change the priorities, just in case a surreptitious .html gets in there.
---------------------------------
I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave
CCC Link[ ^]
English League Tables - Live
|
|
|
|
|
That's correct. Remember that the browser has no knowledge of what the server can serve up to it.
|
|
|
|
|
|
dynamically creating aspx pages using xslt and xml
|
|
|
|
|
OK. What is the question?
Failure is not an option; it's the default selection.
|
|
|
|
|
Hi, i am currently doing a project on web service for wine. i have the wine table with wineName and wineType. Also i have the search function implemented in the webservice coding as well as a separate webform to call the function of the search function.
I have the following code for performing search in the search service:
<WebMethod()> _
Public Function Search(ByVal searchName As String) As System.Data.DataSet
Dim connectionString As String = ConfigurationManager.ConnectionStrings("ConnectionString").ConnectionString
Dim con As New SqlConnection(connectionString)
Dim selectSql As String = "SELECT * From Wine WHERE WineType='" & searchName + "'"
Dim selectAdapter As New Data.SqlClient.SqlDataAdapter(selectSql, con)
Dim ds As New Data.DataSet
con.Open()
selectAdapter.Fill(ds, "Wine")
con.Close()
Return ds
End Function
As for the webform, it's just a simple page with textbox labeled as searchName, a button and a gridView1 tied to ObjectDataSource.
This is the coding i have for webform:
Partial Class Search
Inherits System.Web.UI.Page
Dim searching As searchwine.Service = New searchwine.Service
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
If searchName.Text = "" Then
lblDisplayError.Text = "Can't search empty field!"
Else
Dim ds As DataSet = searching.Search(searchName.Text)
GridView1.DataSource = ds.Tables(0)
GridView1.DataBind()
GridView1.Visible = True
lblDisplayError.Visible = False
End If
End Sub
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
lblDisplayError.Text = ""
GridView1.Visible = False
End Sub
End Class
Everything seems fine but i have the following error when i want to do a search:
System.NullReferenceException: Object reference not set to an instance of an object.
at Service.Search(String searchName)
Can anyone help me out please? thank you very much
|
|
|
|
|
So what happens when you step through and debug it?
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
the error occurs at the following line of code:
Dim ds As DataSet = searching.Search(searchName.Text)
Is there any way that i can improve this line?
|
|
|
|
|
You are getting a null reference error. But you already have an if statement checking searchName.Text so it isn't searchName which means either searching is null or the error is actually occuring inside the searching.Search method.
I believe your error is actually happening within Search so try stepping into that function as you debug.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
thanks ryan.
for my search service i have the following code
<WebMethod()> _
Public Function Search(ByVal searchName As String) As System.Data.DataSet
Dim connectionString As String = ConfigurationManager.ConnectionStrings("ConnectionString").ConnectionString
Dim MyConnection As New SqlConnection(connectionString)
Dim MyCommand As New SqlCommand()
MyCommand.Connection = MyConnection
MyCommand.CommandType = Data.CommandType.Text
MyCommand.CommandType = "SELECT * From Book WHERE WineType like @prmSearchName"
MyCommand.Parameters.AddWithValue("prmSearchName", "'%" & searchName & "%'")
MyCommand.Connection = MyConnection
Dim selectAdapter As New Data.SqlClient.SqlDataAdapter
Dim ds As New Data.DataSet
MyConnection.Open()
selectAdapter.Fill(ds, "Wine")
MyConnection.Close()
Return ds
End Function
does the code looks good to you?
|
|
|
|
|
Ya, I didn't notice anything wrong which is why I suggest you step into the web service, if you can. Is the web service in a different project? If so, put try catch around your code in the service (which you really should have anyway ) and hopefully you can see a stack trace of which line exactly is causing the issue.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
thanks ryan for your replies. yes the web service is a different project. i did the web referencing and stuffs required to be brought in accordingly. but still the error exists.
|
|
|
|
|
So, when you debug is searching null? If not, the error is happening inside the webmethod so you need a way to debug that. For example, add a try catch and write to a log.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
Suppose This Query
SELECT * From Wine WHERE WineType='ABC'
Return No Table
Then How Can You Set the Datasource Of Gridview1 to ds.tables[0]
GridView1.DataSource = ds.Tables(0)
Hope U Understand this.
|
|
|
|
|
hi.i want to read byte of save picture and show in fileUpload control.the below code dont work.please quidance me
while (dr.Read())
{
picture_fileUpload = (byte[])dr["picture"];
}
|
|
|
|
|
You can't assign a value to an upload control. What are you trying to accomplish?
Failure is not an option; it's the default selection.
|
|
|
|
|
this is edit page and i want that fileupload kept last image value and if we select new image then change its value
|
|
|
|
|
So display the existing image and check the FileUpload.HasFile property. If true then the user has selected a new file to be uploaded. Why make it more difficult?
Failure is not an option; it's the default selection.
|
|
|
|