Actually im getting error when the below code is executed from unit test project... where import is an xml file in the below code.. XmlTextReader importReader= new XmlTextReader(System.Web.Hosting.HostingEnvironment.MapPath("~/Content/Importcontent/import")); the above code is present in one of the methods in different project(class library) which is used in test method in the unit test project where as the above path is present in web project. and the value of the System.Web.Hosting.HostingEnvironment.MapPath("~/Content/Importcontent/import") is null..ie unable to get the complete path of the file i guess bcos the hostingenvironment is not running(web project) The above code is working fine when running from the webproject ie it returns the exact path. whereas returning null value when running from test project. please let me know how to fetch the file path(where file is present in web project) when running from test project.
I have some objects I should add to ASP.NET application state. Of course, I can add the object as a whole. The class that object belongs to have some properties and all of them will be added with the object to the application state.
But, is there a way to mark some properties of the class to not be included in adding object to the application state? I've thought about writing attribute, but am not sure if it will work.
i would like to do (ASP.NET-AJAX with C# )an autocomplete search textbox(like Google search) that give the user to choose more than one value to research in DataGrid as follows :
1 | 2 | 3
when the user insert the first value can have also the possibilities to insert the second value value and so on ... then the datagrid can show all result requested and preferably i should do it in C# .
You can use this control(Multiselect Dropdown for Web Applications[^]) coupled with AJAX calls to make it as an autocomplete list. Based on the text entered, filter the datasource of the checkboxlist and once the values are selected, use the selected values as a folter for your grid.
it is a good example but i can not filter the checklist box meantime i am inserting the value in the textbox...anyway i am trying to repair this error if you have any suggestion i will be so gratefel.
not error in the project on codeproject but in my project that meantime i insert the value in the textbox i want the checkboxlist work likes the Autocomplete but it doesn't that so ai m trying to complete this issue.
Thanks so much for your help .
I am very confused to choose among many ways to do a task efficiently. Please suggest me the best way to do the following..
All I want is to "search a sql-database and show up the result in a grid". Note that each row would have an image, a link and some text.
My main check points are
1) Ajax-style grid: On pressing next-page, only the grid should be updated not the whole page
2) Client side pagination: Since the search result might be huge, on each time pressing the next-page, I want to get only the specified rows from the server. NOT THE WHOLE SEARCH RESULT- WHICH WOULD SLO DOWN MY INITIAL GRID SHOWING
I am new to web-programming. While browsing through I got the following points...But i am not able to put them all together and somehow i am not confident about it..very much confused what to use and what not to... please help!!!
1) asp.net ajax toolkit
2) use a simple way to create a table with many rows in client side using java script, and get the data form server using AJAX writing the all code of myself. But in this case i need to have a way of pagination if myself
3) etc (may be many other solutions exist)
Practically, there may be many pros and cons which I am unaware of. I am looking for something efficient and easy to use. May be less code.
technology: vs2008/2010, Ajax/Jquerry/JS, sql-db... since havent started teh project I am open to any technology which gives the best solution.
I am looking for something efficient and easy to use. May be less code.
Based on the following parameters, my suggestions would be:
1. Use a DataGrid and not a simple table to avoid extra code
2. Implement server side pagination such that each page is fetched on-demand
3. Use client side techniques to update the grid - jQuery AJAX, ASP.NET AJAX, Callback, WebMethods, etc.
One mistake in your question: "Client-side pagination" => that means whole data in one go and on page change no data fetched from server. That would not be needed.
From the microsoft site, I can see you can use the log property of the datacontext object for debugging linq to sql in a visual studio.net 2010 web form application. From what I have seen on the internet, you can do a console.out to any instance of a textwriter. This would be for a windows application.
How would you accomplish this task for a web form 2010 C# application?
Create a class
Public Class atuosender
Dim timer As System.Timers.Timer
Dim filepath As String
Public Sub New(ByVal st As String)
Dim timer As New System.Timers.Timer(8640000)
filepath = st
AddHandler timer.Elapsed, AddressOf timer_Elapsed
timer.Enabled = True
Private Sub timer_Elapsed(sender As Object, e As ElapsedEventArgs)
File.AppendAllText(filepath + "\TextFile1.txt", "Heloo")
End Namespace add global.asax
Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs)
Dim ats As New clsatuosender.atuosender(Server.MapPath("files").ToString())
' Fires when the application is started
how to use array in asp.net textbox
when I press the save button the value of text which i fill will be write on response.write??
Last Visit: 31-Dec-99 19:00 Last Update: 27-Dec-14 6:31