Last post Jun 18, 2009 02:45 AM by kumar.abhishek85
Jun 17, 2009 03:30 AM|kumar.abhishek85|LINK
i am new to ASP.Net. I am maintaining the website of the company i am working in.
I downloaded all the files and the database(SQL Server) of the website from the hosting center and built it on my system in VWD 2008. Everything is working fine except the custom controls, which are used to display news on the webpage from the database.
When i run the website on my system, the content (from custom controls) is not displayed on the page.
The Custom controls (ViewContent.cs & ViewContentDetails.cs) are placed in a folder CustomControls in the App_code folder. Both the .cs files have a namespace definition "CustomControls". In the web.config file, the following code is there:
<pages theme="GETtheme" validateRequest="false">
<add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=184.108.40.206, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=220.127.116.11, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add namespace="AjaxControlToolkit" assembly="AjaxControlToolkit" tagPrefix="ajaxToolkit"/>
<add tagPrefix="GETcc" namespace="CustomControls"/>
In the master page, the following code is there for the content to be displayed:
<GETcc:ViewContent ID="ViewContentNews" runat="Server" publisherCategory="News" />
But i don't know why the content is not displayed when i run the website.I have tried many things but its of no use.
So please somebody help me with this. Its very important for me.
Thanks in advance.
Jun 17, 2009 09:41 AM|papabear|LINK
Is it throwing an error, or are you simply not getting any news? If it is not throwing an error than it is probably loading the control fine, it just is not returning anything. You might try a quick tweak of the control to have it display dummy data (maybe
just a label or text) so that you can verify that it is loading.
It could be something as simple as that your sql query is not returning any info.
Hope this helps,
Jun 18, 2009 02:45 AM|kumar.abhishek85|LINK
Well thanks buddy. I tried to print a text and it did. I also checked the queries and they were working fine but then also it was not displaying the content.
Then I uninstalled SQL Server completely and reinstalled it. Earlier i installed it with windows authentication. Now, I set a userid & password for connecting SQL Server and modified the connection string in web.config. When i tried to run the website, it
Thanks for ur help buddy. [;)]