.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

change latest news runtime

Posted By:      Posted Date: September 18, 2010    Points: 0   Category :ASP.Net
one of my client has the requirement of changing the latest news section of website dynamically or runtime so not to publish the site and host it agian and again.this section is in master page how can i achieve this in asp.net c# 

View Complete Post

More Related Resource Links

How to Localize Windows Forms and Change the Language at Runtime

Localization is the process of customizing your application to a particular language, culture or locale. Visual Studio provides support for localizing Windows Forms with much ease. In this article, we will see how to localize windows forms and give the user the ability to change to his preferred language at runtime.
When you run a localized application, the appearance is determined by two culture values. The UICulture property is used to specify which resource files will be loaded for the form. The Culture property, on the other hand, determines how strings such as dates, numerals, and currency amounts are formatted.
Let us see the steps required to create a localized form. You can then expand this example and adopt the same approach for the rest of the forms in your project

How can i change the assembly's attributes at runtime?

i know how to get the assembly's attributes at runtime, it's like this: Assembly asm = Assembly.GetExecutingAssembly(); string asmDesc = ((AssemblyDescriptionAttribute)asm.GetCustomAttributes(typeof( AssemblyDescriptionAttribute ), false )[0]).Description; but how to set it at runtime?? I just found AssemblyBuilder.SetCustomAttribute(),  but can AssemblyBuilder be used in current asm or a assigned asm? thx~

Can I change report SQL Statement at runtime?

I need to change  report SQL Statement  at runtime. I need to do this because I have too much parameters and it's simple to me to change SQL statement.

Change search scope for SharePoint search control at runtime

I have a requirement where based on a users SharePoint group, there search should be for a specific scope. My question is, is it even possible to change the SharePoint search box to use search a particular scope at runtime?

How to change wpf image source on runtime ?


I get new bitmap from some other component ( dont have any control on the other component ) every 5 seconds and i need to update my wpf image control with the new bitmap ( every 5 seconds ... ).


[ i cant save the bitmap to the disk and then load it as file ]

I cant find any way to update this wpf image control in run-time.

How can i do it ?


Change the width of the TextBox at runtime depending on it's MaxLength


I know the MaxLength of the TextBox and depending on that I want to change width of the textbox at runtime.

How can i change TextBlock color at Runtime..??


I'm having a TreeView control like..

<TreeView Name="treeViewInstance" Height="auto" SelectedItemChanged="tv_SelectedItemChanged" 
                 ItemsSource="{Binding Source={StaticResource engInstance}}">
                <HierarchicalDataTemplate DataType

store procedure parameter sequence Change In runtime...



this is my code:

builder.Append(string.Format("INSERT INTO deads " +
            " (DieID, Title, FName) " +
            "VALUES ( {0}, {1}, {2} )",
            dt_excel_allRows.Rows[1][0].ToString(), dt_excel_allRows.Rows[1][1].ToString(), dt_excel_allRows.Rows[1][2].ToString()))

some of my col datatype is nVarchar...

in run time because  my value in my table (dt_excel_allRows) are FARSI ; the sequence of my parameter changed and it cant be executed!!!!!

of course the problem is because of FARSI is rtl languges....

how can i fix the problem...

i can not user sqlPArameter becuse of some reason....

i think some thing like rtl or ltr can fix my problem....but how?


Change config tcp endpoint's IP in App.config during runtime.


I currently have a WCF service library, a WPF host app, a shared project that uses the service library as a service reference and 2 projects that reference the project that service references the service library...I hope that made sence. I was wondering how to modify the service library's App.config file during run time with another WPF add that would modify the IP and other information in the app.config files.


Their are a total of 5 App.config files and i need a WPF app to change all 5 accordingly. The problem that happens is that the service library creates a dll when the app.config file packed inside.


Any ideas?

Reportviewer- Change report in runtime



How can i change a report in runtime?

Thank you


SQL Server (2005 to latest) - Change dynamic port to static TCP port 1433 automatically


Hello All !

By default, when I install SQL Server (from 2005 to the lastest), the TCP port 1433 is not set to 1433 on the network interfaces (see with SQL Server Configuration manager - Network Connections - TCP/IP enable - properties - IPAll).

Many of applications use this 1433 port. I want to change this port automatically, after installation and disable dynamic ports

How can I do this with a powershell script ? or by Transact-SQL ?


Thanks for advance for your ideas / help - Regards - Have a nice day ! RHUM2

DataTemplate change text and image on runtime




I am trying to set up a PeekPreview with WPF(VB). I already added text and can change it on runtime, but I'm not able to change the image in the background. I also used google and this forum, but can't find a solution for this problem.

I would be glad if someone could help me with this problem (I also understand C# ;) )


and finaly the code behind:


<DataTemplate x:Key="PeekPreview">
 <Grid Width="180" Height="70" Name="bg_Grid">
 <Rectangle Stroke="White" StrokeThickness="0">
  <ImageBrush ImageSource="/SuperWeather%202%20-%20WPF;component/Resources/peekpreview.png" />
 <Image Source="{Binding}" Width="60" Height="60" Margin="1" HorizontalAlignment="Left" x:Name="peek_image">
 <TextBlock Name="textblock" Text="{Binding}" TextAlignment="Right" Foreground="White" FontWeight="Bold" Height="Auto" VerticalAlignment="Stretch" FontSize="11" Padding="0,4,8,4">
	  <OuterGlowBitmapEffect GlowColor="Black" GlowSize="3"

Create And Run Excel Macro At Runtime in C#

You've been tasked with writing a Windows Form application using the .NET Framework that interacts with Microsoft Excel. If you are new to working with Excel in .NET and are having trouble learning how to format certain cells or cell ranges, then this little tip will come in handy. Rather than scour the internet hoping to find the correct set of constants or method syntax for formatting your spreadsheet, use the built in tools in Excel to write the familiar VBA code for you. Then, you can paste the VBA code generated by Excel into the sample C# code below and run it dynamically at runtime.

Selected to change the background color of the page



As this site, http://www.borfin.com.tr/genel/Default.aspx, How can I change the background color selected pages.

Bug: Does not change column type from nvarchar to ntext


Scenario: If you create a table with a column of type nvarchar, populate it with some content and try to modify it using the WebMatrix editor, from nvarchar to ntext, it does not display any error message or warning that this is not possible. It silently saves and reverts the change, back to nvarchar. Wasted some hours on this issue as I thought my column was ntext, but in fact was still nvarchar.

Expected behavior: It should change to ntext, or if SQL CE doesn't support that, it should notify the user that no change was applied.

How to change the default page base class?


I've tried setting the <pages pageBaseType="DynamicWebPage" /> value in web.config, but when I response.write out the page type, I'm still getting Microsoft.WebPages.WebPage.

I'm simply trying to sub-class WebPage and add some additional functionality such as a dynamic PageData dictionary similar to Phil Haack's dynamic ViewData dictionary.



Create new sql table at runtime VB.Net


I want to create a new table to sql database at runtime.  The column names would be "Name", "Date", "Event".  I would also like to have one more column name "Image" but the problem is that since the amount of images will vary, I want the application to count the amount of files in the Multiple fileuploader and then add a image column to the table for the respected amount of files. 

For example if i am uploading 3 files in the multiple fileuploader, the names should be "Name", "Date", "Event", "Image1", "image2", Image3"

I also would like that table name to be name dynamically from the textbox Name when the user enters the information.

I have the following code to make a new table, but I dont know how to name the fields at runtime like previously asked please help!!!

Dim objConn As New SqlConnection("Server=<servername>;uid=<userid>;pwd=<password>;database=master")


ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend