I have a textbox having textmode 'multiline' in which one can write source code, so my requirement is to make some part of textbox text to be read only and some part to be editable.....Suppose in a textbox there is 1 to 10 line(no of rows)... so i want row no.1 to row no.3 to be raedonly means no one can edit these rows, next row no.4 to row no.7 to be editable, and again row no.8 to row no.10 to read only.
How to achieve the above requirement... ??
I'll make the assumption that any line which can be edited cannot be broken into multiple lines...
As somebody else mentioned, it would be much easier to use another control, such as a grid view (or repeater), to split each line into its own control. That will allow you, for example, to more clearly indicate which lines are editable and which are read only (e.g., by graying out the read only lines).
I would say better would be using one from tone of JS libs, and RegExp on server but it's just my opinion.
Also if customer would allow this with his browsers HTML5 masked textbox would be good solution to.
Thread ID: 12
Thread account name: AUSTRALIA1\Administrator
Is impersonating: True
Stack trace: at System.Web.UI.Page.HandleError(Exception e)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context)
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at ASP.default_aspx.ProcessRequest(HttpContext context)
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
Item #4 of the above link states that it is not intended for "
... a program called from server-side web application such as ASP.NET ...
So what is the preferred method to access data stored in Excel for an ASP.NET application ?
I understand that you don't want to build an OLTP system usign Excel as a datastore ... but I have a situation where there is a spreadsheet which is updated by one department and I was thinking of buidling a simple webpage which would be used as search front-end for folks who do not have "edit" access to the Excel doc. Should be OK? Right?
If I recall correctly in Win7 Ole JET DB is deprecated and you should use mentioned ACE.OLEDB.12.0.
For older systems use JET. This should be installed with office and one of them should be accessible.
In my app I use web.config connection: jet for production with older version of WinServer and OLEDB for my Win7 dev machine.
I don't know if there is better way.