|
Hi,
I need to Freeze the Header of a GridView.
I used the following property in Style of Header:
position:relative;
top:expression(this.offsetParent.scrollTop);
This works in IE8 compatibility view. but not in Chrome, Firefox or IE8.
can anyone please help me in this.
Thanks
|
|
|
|
|
|
Hi Abhijeet,
I also did the same to freeze the header. But its not working in IE8, Mozilla and Chrome.
I could not run your code.
Getting error: "Could not load file or assembly 'System.Web.Extensions,..."
Any suggession?
|
|
|
|
|
Anurag Gandhi wrote: I could not run your code.
Getting error: "Could not load file or assembly 'System.Web.Extensions,..."
Just fix this error using :
http://forums.asp.net/t/1135367.aspx[^]
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
do not use expression in CSS...
Browser renders it for every action, thus the site will be slower. Even mouse-move will call it also.
|
|
|
|
|
Abhishek Sur wrote: do not use expression in CSS
I agree with you. But sometimes you have no other option.
|
|
|
|
|
If Any One Is Familiar With Grey Box
Plz. Answer This.
" How To Open GreyBox In Another Grey Box"
|
|
|
|
|
hi all,
we want to find if the text in thetextbox is selected or not .
its working in Internet expolorer.
IE code
if(document.selection.type == 'Text')
{
return true;
}
but it is not working in FireFox .
Can any body tell how to do it in FF.
Thanks in advance.
|
|
|
|
|
do you check for document.selection.createRange for IE ?
Use like this :
var txt = '';
if (window.getSelection)
txt = window.getSelection();
else if (document.getSelection)
txt = document.getSelection();
else if (document.selection)
txt = document.selection.createRange().text;
I think this will do the trick.
|
|
|
|
|
hi ,
i used it , its not working .
i.e it is triggered if the cursor is just the textbox .
actually we want to enable the input only if the text is selected . i.e it is one condition.
and even return true; is not working in FF.
so is there any other way we could do it .
|
|
|
|
|
You need to focus before you call selection.
Use this function :
function ShowSelection()
{
var textComponent = document.getElementById('Editor');
var selectedText;
if (document.selection)
{
textComponent.focus();
var sel = document.selection.createRange();
selectedText = sel.text;
}
else if (textComponent.selectionStart)
{
var startPos = textComponent.selectionStart;
var endPos = textComponent.selectionEnd;
selectedText = textComponent.value.substring(startPos, endPos)
}
alert("You selected: " + selectedText);
}
I think this will solve the problem.
|
|
|
|
|
Hi ,
sorry for late reply.
but i got the solution to find if the text is selected in a textbox.
@abhishekh the by u was helpful to for the solution.
it is something like,
i.e
var s1= srcElement.selectionStart;
var s2= srcElement.selectionEnd;
if( document.selection )
{
if(document.selection.type == 'Text')
{
statements .....
}
else
{
if ( s1 != s2)
{
statements....
}
}
which is very simple.
Thanks and Regards,
sriharsha
|
|
|
|
|
Hi Guys,
I know that this is an ASP.Net forum, but just in case some of you still remember about the classic ASP, I have one question.
How can I assigned connection in Classic ASP using the MSSQLServer 2005?
I tried this code below, but I got an error.
Below is the connection string I have tried, but has an error
Application("ConnStr") = "server=PC\SQLEXPRESS;database=TestDB;Trusted_Connection=True;"
What's wrong with it?
hifiger2004
|
|
|
|
|
|
I guess ASP uses class ADO for data base connection .You need t provide provider information
Provider=SQLNCLI10;Server=myServerAddress;Database=myDataBase;Trusted_Connection=yes;
|
|
|
|
|
hifiger2004 wrote: What's wrong with it?
Everything
Google for ado, check connectionstrings.com for connection details
Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP
|
|
|
|
|
still doesn't work
In ASP.Net there's no problem when using this type of connection string inside the web.config
<add name="ConnStr" connectionString="Data Source=PCName\SQLEXPRESS; Initial Catalog=MyDatabase;Integrated Security=True" providerName="System.Data.SqlClient" />
I tried the codes below and placed it inside the global.asa but still doesn't work.
Error: An unhandled exception ('[Microsoft][ODBC Driver Manager] Dta source name not found and no default driver specified') occurred in dllhost.exe [1368].
ConnStr = "Driver={SQL Server};Data Source=PCName\SQLEXPRESS;Initial Catalog=MyDatabase;Trusted_Connection=Yes;"
Or
ConnStr = "Provider=SQLOLEDB; Data Source =PCName\SQLEXPRESS; Initial Catalog = MyDatabase;Integrated Security=SSPI;"
It's really time consuming, I followed everything you told me from connectionstrings.com but still doesn't work at all.
hifiger2004
|
|
|
|
|
hifiger2004 wrote: In ASP.Net there's no problem when using this type of connection string inside the web.config
But you are using CLASSIC ASP you said. It knows nothing about web.config, global.asa etc, these are .NET only.
You need to use ADO NOT ADO.NET, create connection objects and so on. Take a look at this:
http://support.microsoft.com/kb/299980[^]
Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP
|
|
|
|
|
Hi Guys,
i am getting the following error, creating an excel file dynamically through asp.net application.
The server process could not be started because the configured identity is incorrect. Check the username and password.
Exception Details: System.Runtime.InteropServices.COMException: The server process could not be started because the configured identity is incorrect. Check the username and password
source code as follows
Dim xlApp As New Microsoft.Office.Interop.Excel.ApplicationClass
' Create a new Excel Workbook
Dim excelWorkbook As Microsoft.Office.Interop.Excel.Workbook
excelWorkbook = xlApp.Workbooks.Add(Type.Missing)
Dim xlWorkSheet As Microsoft.Office.Interop.Excel.Worksheet
Dim misValue As Object = System.Reflection.Missing.Value
excelWorkbook = xlApp.Workbooks.Add(misValue)
xlWorkSheet = excelWorkbook.Sheets("sheet1")
xlWorkSheet.Cells(1, 1) = "http://vb.net-informations.com"
xlWorkSheet.SaveAs("C:\vbexcel.xls")
excelWorkbook.Close()
xlApp.Quit()
|
|
|
|
|
Robymon wrote: The server process could not be started because the configured identity is incorrect. Check the username and password.
Exception Details: System.Runtime.InteropServices.COMException: The server process could not be started because the configured identity is incorrect. Check the username and password
Your application ruining from VS IDE or IIS ? If IIS does the user having sufficient permission to write on your system ?
If its from IIS, you can create a new Application pool for your web application with Identity "Local System" . Then you can try.
How to create Application pool and set up all other stuff, please read this article .
Beginner's Guide : Exploring IIS 6.0 With ASP.NET [^]
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
I created a new application pool with identity local system, but am getting some other error. Error is as follows.
Unable to validate data
|
|
|
|
|
That is the different error that you were getting earlier. Check the code or you may enable the Error details from web.config for get the proper details.
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
could i change the culture of any server control in asp.net 3.5
From en to es
|
|
|
|
|
amit sahu20 wrote: could i change the culture of any server control in asp.net 3.5
From en to es
Are you talking about localization of your application ?
Localization in ASP.NET 2.0[^]
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
Hi All,
I am using help provider control.
my requirement is when i press F1 i should get the .chm file -- I done
but my .chm file should highlight the "Index" part as the default however, I want to highlight the "content" Tab not the "index" Tab.
For example if i am seeing the customer form and when i hit the F1 it should highlight the Customer page which is in the .chm file
Thank in advance
Ramkumar
("When you build bridges you can keep crossing them. ")
http://ramkumarishere.blogspot.com
|
|
|
|