Search Results

Search found 4334 results on 174 pages for 'sender'.

Page 87/174 | < Previous Page | 83 84 85 86 87 88 89 90 91 92 93 94  | Next Page >

  • How Gridview co-operates with ObjectDataSource?

    - by sanjuro
    Hi, how Gridview co-operates with ObjectDataSource internally? When you set DataSourceID of GridView, assigned ObjectDataSource take care of such things as paging and sorting, but i don't have full control above databinding itself, on the other side when i set datasource of gridview in code-behind: protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { testGridView.DataSource = testObjectDataSource.Select(); testGridView.DataBind(); } } Now i have full control, but i have lost the advantage of comfort sorting and paging. And that co-operation between ObjectDataSource and Gridview became mystery for me. So can anybody explain me in details how ObjectDataSource and Gridview co-operates under the hood? I want to understand it in order to write my own smart code or own gridview that will mimic this co-operation. Many thanks for answers.

    Read the article

  • ASP.NET treeview populate child nodes. How can I avoid a postback to server?

    - by mas_oz2k1
    I am trying to test populate on demand for a treeview. I follow the procedure from these links: http://msdn.microsoft.com/en-us/library/e8z5184w.aspx But the treeview still make a postback to the server if I expanded one of the tree nodes (If you put a breakpoint in the first line of Page_load event), thus refreshing the whole page. I am using VS2005 and Asp.net 2.0 (but the same issue occurs in VS2008) My simple test page markup is: <%@ Page Language="C#" AutoEventWireup="true" CodeFile="aspTreeview.aspx.cs" Inherits="aspTreeview" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server"> <title>Untitled Page</title> </head> <body> <form id="form1" runat="server"> <div> <table> <tr> <td style="height: 80%; width: 45%;"> <asp:Panel ID="Panel1" runat="server" BorderColor="#0033CC" BorderStyle="Solid" ScrollBars="Both"> <asp:TreeView ID="TreeView1" runat="server" ShowLines="True" PopulateNodesFromClient="True" EnableClientScript="True" NodeWrap="True" ontreenodepopulate="TreeView1_TreeNodePopulate" ExpandDepth="0"> </asp:TreeView> </asp:Panel> </td> <td style="width: 10%; height: 80%;" > <div> <asp:Button ID="Button1" runat="server" Text="->" onclick="Button1_Click" /> </div> <div> <asp:Button ID="Button2" runat="server" Text="<-" /> </div> </td> <td style="width: 136px; height: 80%"> <asp:Panel ID="Panel2" runat="server" BorderColor="Lime" BorderStyle="Solid"> <asp:TreeView ID="TreeView2" runat="server" ShowLines="True" ExpandDepth="0"> </asp:TreeView> </asp:Panel> </td> </tr> <tr> <td> </td> <td> </td> <td style="width: 136px"> </td> </tr> </table> </div> </form> </body> </html> The code behind is: protected void Page_Load(object sender, EventArgs e) { Debug.WriteLine("Page_Load started."); if (!IsPostBack) { if (Request.Browser.SupportsCallback) Debug.WriteLine("Browser supports callback scripts."); for (int i = 0; i < 3; i++) { TreeNode node = new TreeNode("ENTRY " + i.ToString()); node.Value = i.ToString(); node.PopulateOnDemand = true; node.Expanded = false; TreeView1.Nodes.Add(node); } } Debug.WriteLine("Page_Load finished."); } protected void TreeView1_TreeNodePopulate(object sender, TreeNodeEventArgs e) { TreeNode targetNode = e.Node; for (int j = 0; j < 4200; j++) { TreeNode subnode = new TreeNode(String.Format("Sub ENTRY {0} {1}", targetNode.Value, j)); subnode.PopulateOnDemand = true; subnode.Expanded = false; targetNode.ChildNodes.Add(subnode); } }

    Read the article

  • Why doesnt the AsyncCallback update my gridview?

    - by Naruji
    Hi all, I started working with delegates last week and i am trying to update my gridview async on the background. All goes well, no errors or such but i dont get a result after my EndInvoke. does anyone know what i am doing wrong? Here is a code snippet: public delegate string WebServiceDelegate(DataKey key); protected void btnCheckAll_Click(object sender, EventArgs e) { foreach (DataKey key in gvTest.DataKeys) { WebServiceDelegate wsDelegate = new WebServiceDelegate(GetWebserviceStatus); wsDelegate.BeginInvoke(key, new AsyncCallback(UpdateWebserviceStatus), wsDelegate); } } public string GetWebserviceStatus(DataKey key) { return String.Format("Updated {0}", key.Value); } public void UpdateWebserviceStatus(IAsyncResult result) { WebServiceDelegate wsDelegate = (WebServiceDelegate)result.AsyncState; Label lblUpdate = (Label)gvTest.Rows[Convert.ToInt32(key.Value)].FindControl("lblUpdate"); lblUpdate.Text = wsDelegate.EndInvoke(result); }

    Read the article

  • DataTemplate in ListBox

    - by Anu
    Hi, I have tabcontrol,in that by pressing second tab button im adding data to third Tab Listbox.But its not get added. SecondTab function: private void Callbutton_Click(object sender, RoutedEventArgs e) { tab.AddPresetmenu("CALL BUTTON"); } ThirdTab Fucntion: ObservableCollection<DataItem> items = new ObservableCollection<DataItem>(); public void AddPresetmenu(string pMenu) { items.Add(new DataItem(pMenu)); menubox.ItemsSource = items; } Third Tab ListBox XAML: <ListBox x:Name="menubox" Margin="0,5,0,0" Height="244" Width="240" Background="Silver" BorderThickness="0"> </ListBox> I think Im missing something.Please Help me.

    Read the article

  • Can't make an array in C#

    - by Josh
    I'm trying to make a dynamic array in C# but I get an annoying error message. Here's my code: private void Form1_Load(object sender, EventArgs e) { int[] dataArray; Random random = new Random(); for (int i = 0; i < random.Next(1, 10); i++) { dataArray[i] = random.Next(1, 1000); } } And the error: Use of unassigned local variable 'dataArray' This is just baffling my mind. I came from VB, so please me gentle, lol. Cheers.

    Read the article

  • Use C++ with Objective-C in XCode

    - by prosseek
    I want to use/reuse C++ object with Objective-C. I have a hello.h that has the class definition, and hello.cpp for class implementation. class Hello { int getX() ... }; And I use this class in Objective-C function. #include "hello.h" ... - (IBAction) adderTwo:(id)sender { Hello *hi = new Hello(); int value = hi->getX(); NSLog(@"Hello %d", value); [textField setIntValue:value]; When I compile the code in Xcode, I get this error message. class Hello *XXXXX Users/smcho/Desktop/cocoa/adderTwo/hello.h:9:0 /Users/smcho/Desktop/cocoa/adderTwo/hello.h:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Hello' Q: What went wrong? Am I missing something?

    Read the article

  • ComboBox.SelectionChanged doesn't catch the first selection

    - by trnTash
    I need to fill textboxes depending on the item selected in a combobox. I fill combo async and in Completed event I have the following code combo.ItemsSource = e.Result; combo.DisplayMemberPath = "Name"; combo.SelectedIndex = -1; Then in the SelectionChanged event of the combo, I catch the selected object MyClass mc= ((ComboBox)sender).SelectedItem as MyClass; tbxName.Text = mc.Name; ... However, when I load the project and select any event for the 1st time, NOTHING happens. Every other time (2nd, 3rd, nth) the data is correctly caught and displayed. So I need to know why the combo doesn't catch the first selection? That's the reason I have the code combo.SelectedIndex = -1 (when the app loads, combo is empty - selection -1 works).

    Read the article

  • Databinding race condition

    - by Stephen Price
    I have a login form (using ChildWindow) and have implemented a Keyup event handler on the passwordbox. If the key is enter then it sets the ChildWindow ResultDialog to true. What seems to be happening is the databinding on the Passwordbox is not happening before the childwindow is closed so the Password property on my Login control is null. I've tried using KeyUp and Keydown, as well as using a buttonAutoPeer to invoke a click on the Ok button. I've also tried setting the focus to the OKbutton before setting the DialogResult (which closes the window). private void PasswordBox_KeyUp(object sender, KeyEventArgs e) { if (e.Key == Key.Enter) { if (UsernameBox.Text != userPrompt && !string.IsNullOrEmpty(PasswordBox.Password.Trim())) { this.DialogResult = true; } else { UsernameBox.Focus(); } } }

    Read the article

  • After playing a MediaElement, how can I play it again?

    - by Edward Tanguay
    I have a variable MediaElement variable named TestAudio in my Silverlight app. When I click the button, it plays the audio correctly. But when I click the button again, it does not play the audio. How can I make the MediaElement play a second time? None of the tries below to put position back to 0 worked: private void Button_Click_PlayTest(object sender, RoutedEventArgs e) { //TestAudio.Position = new TimeSpan(0, 0, 0); //TestAudio.Position = TestAudio.Position.Add(new TimeSpan(0, 0, 0)); //TestAudio.Position = new TimeSpan(0, 0, 0, 0, 0); //TestAudio.Position = TimeSpan.Zero; TestAudio.Play(); }

    Read the article

  • Synchronizing scroll positions for 2 WPF DataGrids

    - by Philipp Schmid
    I am trying to synchronize the horizontal scroll position of 2 WPF DataGrid controls. I am subscribing to the ScrollChanged event of the first DataGrid: <toolkit:DataGrid x:Name="SourceGrid" ScrollViewer.ScrollChanged="SourceGrid_ScrollChanged"> I have a second DataGrid: <toolkit:DataGrid x:Name="TargetGrid"> In the event handler I was attempting to use the IScrollInfo.SetHorizontalOffset, but alas, DataGrid doesn't expose IScrollInfo: private void SourceGrid_ScrollChanged(object sender, ScrollChangedEventArgs e) { ((IScrollInfo)TargetGrid).SetHorizontalOffset(e.HorizontalOffset); // cast to IScrollInfo fails } Is there another way to accomplish this? Or is there another element on TargetGrid that exposes the necessary IScrollInfo to achieve the synchronization of the scroll positions? BTW, I am using frozen columns, so I cannot wrap both DataGrid controls with ScrollViewers.

    Read the article

  • SQL-Calculate percentages from database table values

    - by Howard
    Hi, Im trying to calculate the percentages of selected fields from tables. Within the fields that data is numeric but I want to show the percentage value. Please help. private void btnpics_Click(object sender, EventArgs e) { try { myCon.Open(); string queryString = "SELECT FoodType.Description,FoodType.Calories, FoodType.Carbohydrate, FoodType.Fat, FoodType.Protein FROM [FoodType], [Meal] WHERE (Meal.UserID =" + userid.Text + ") AND (Meal.MealDate =" + date.Text + ");"; MessageBox.Show(queryString); loadDataGrid(queryString); } catch (Exception ex) { MessageBox.Show(ex.Message); } }

    Read the article

  • Convert byte array to wav file

    - by Eyla
    I'm trying to play a wav sound that stored in byte array called bytes. I know that I should convert the byte array to wav file and save it in my local drive then called the saved file but I was not able to convert the byte array to wav file. please help me to give sample code to convert byte arrary of wav sound to wav file. here is my code: protected void Button1_Click(object sender, EventArgs e) { byte[] bytes = GetbyteArray(); //missing code to convert the byte array to wav file ..................... System.Media.SoundPlayer myPlayer = new System.Media.SoundPlayer(myfile); myPlayer.Stream = new MemoryStream(); myPlayer.Play(); }

    Read the article

  • Async actions inside Silverlight Method - returning the value

    - by tyndall
    What is the proper way to call an Async framework component - wait for an answer and then return the value. AKA contain the entire request/response in a single method. Example code: public class Experiment { public Experiment() { } public string GetSomeString() { WebClient wc = new WebClient(); wc.DownloadStringCompleted += new DownloadStringCompletedEventHandler(wc_DownloadStringCompleted); Uri u = new Uri("http://news.google.com/news?pz=1&cf=all&ned=us&hl=en&topic=t&output=rss"); wc.DownloadStringAsync(u); return "the news RSS from Google"; } private void wc_DownloadStringCompleted(object sender, DownloadStringCompletedEventArgs e) { //don't really see how this callback method makes it able // to return the answer I'm looking for on the return // statement in the method above. } } MORE INFO: The reason I'm asking this that I have a project I'm working on where I'd like JavaScript code in the browser to use Silverlight like a Facade/Proxy to Web services and complex calculations & operations. I'd like to make the calls to the [ScriptableMembers] in Silvelight synchronously. I don't want Silverlight to callback into the browser's JavaScript

    Read the article

  • Receiving messages part by part from serial port using c#

    - by karthik
    I am using the below code to receive the messages from serial port using c# void comPort_DataReceived(object sender, SerialDataReceivedEventArgs e) { if (comPort.IsOpen == true) { string msg = comPort.ReadExisting(); MessageBox.Show(msg.Trim()); } } The problem is, i am getting the messages part by part. Like, if u send "Hello, How are you" I am receiving it word by word. I want that in a single stretch. How can i do ?? Also, is it possible to retrieve the port name from which the application is sending and receiving messages ?

    Read the article

  • Themes wont work when using Server Side Tags on an ASP.NET Page

    - by Sumit Sharma
    The code for the asp.net page is: <div class="facebox_content"> <% if (CurrentUser.Role == "Free") { %> <table cellpadding="0" cellspacing="0" style="border-collapse:collapse;width:380px;"> <tr> <td> User Name : </td> <td> Membership Cost : </td> </tr> <tr> <td style="width:190px;"> <asp:TextBox ID="txtUserName" Enabled="false" runat="server" Text="<%= CurrentUser.Name %>"/> </td> <td style="width:190px;"> <asp:TextBox ID="txtCost" Enabled="false" runat="server" Text="2000"/> </td> </tr> <tr> <td> <br /> Cheque / Draft No.: </td> <td> <br /> Bank Drawn On : </td> </tr> <tr> <td style="width:190px;"> <asp:TextBox ID="txtChqNo" runat="server"></asp:TextBox> </td> <td style="width:190px;"> <asp:TextBox ID="txtBankName" runat="server"></asp:TextBox> </td> </tr> <tr> <td> <br /> Date : </td> <td> <br /> City : </td> </tr> <tr> <td style="width:190px;"> <asp:TextBox ID="txtDate" runat="server"></asp:TextBox> </td> <td style="width:190px;"> <asp:TextBox ID="txtCity" runat="server"></asp:TextBox> </td> </tr> </table> <% } else if(CurrentUser.Role == "Pending") { %> <p style="text-align:justify;"> Your Request is pending with our Administrators. Please be patient while your request is processed. Usually it takes 2-4 Days for your request to be processed after the payment has been received. </p> <% } else if(CurrentUser.Role == "Paid") { %> <p style="text-align:justify;"> You are already a Paid Member of Website </p> <% } %> The code for the C# file is: protected void Page_PreInit(object sender, EventArgs e) { this.Theme = CurrentUser.Theme; } protected void Page_Load(object sender, EventArgs e) { txtUserName.Text = CurrentUser.Name; ConfirmButton.Attributes.Add("onclick", "javascript:document.getElementById('" + lblMsg.ClientID + "').style.display='none';"); if (CurrentUser.Role != "Free") ConfirmButton.Visible = false; } The code is giving the following error: The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>). Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Web.HttpException: The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>). Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace: [HttpException (0x80004005): The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).] System.Web.UI.ControlCollection.Add(Control child) +8678903 System.Web.UI.PageTheme.SetStyleSheet() +478 System.Web.UI.Page.OnInit(EventArgs e) +8699660 System.Web.UI.Control.InitRecursive(Control namingContainer) +333 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +378 Please some one help me out..!!

    Read the article

  • Create UserControl DependencyProperty of which value can be chosen in dropdown list (as combo box)

    - by Viet
    Hello everybody, I'm a starter at WPF, now i would like to make a WPF userControl library which include a Rating bar userControl. All the steps of creating the rating Bar has been done, however i would like to add a property RatingValue: public static readonly DependencyProperty RatingValueProperty = DependencyProperty.Register("RatingValue", typeof(int), typeof(RatingControl), new FrameworkPropertyMetadata(0, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, new PropertyChangedCallback(RatingValueChanged))); public int RatingValue { get { return (int)GetValue(RatingValueProperty); } set { SetValue(RatingValueProperty, value); } } private static void RatingValueChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e) { //... change the rating value } that the user of my UserControl can modify by a value from 0 to 5 that are shown in a dropdown list (combo box) in the Properties windows (as some exist properties of Usercontrols like Visibility, windows style, background ...) How can i do? Thank you very much in advance, Viet

    Read the article

  • Asynchronous Sockets - Handling false socket.AcceptAsync values

    - by David
    The Socket class has a method .AcceptAsync which either returns true or false. I'd thought the false return value was an error condition, but in the samples Microsoft provide for Async sockets they call the callback function synchronously after checking for failure, as shown here: public void StartAccept(SocketAsyncEventArgs acceptEventArg) { if (acceptEventArg == null) { acceptEventArg = new SocketAsyncEventArgs(); acceptEventArg.Completed += new EventHandler<SocketAsyncEventArgs>(AcceptEventArg_Completed); } else { // socket must be cleared since the context object is being reused acceptEventArg.AcceptSocket = null; } m_maxNumberAcceptedClients.WaitOne(); bool willRaiseEvent = listenSocket.AcceptAsync(acceptEventArg); if (!willRaiseEvent) { ProcessAccept(acceptEventArg); } } /// <summary> /// This method is the callback method associated with Socket.AcceptAsync operations and is invoked /// when an accept operation is complete /// </summary> void AcceptEventArg_Completed(object sender, SocketAsyncEventArgs e) { ProcessAccept(e); } Why do they do this? It defeats the purpose of asynchronous sockets and stops the method from returning.

    Read the article

  • slide animation skipped when using updatepanel callback

    - by superexsl
    Hey, I'm trying to use UpdatePanels and JQuery but the panels seem to cancel out the JQuery. I want the user to press the search button, have the system perform the search using AJAX and then display the search results by sliding down the div using JQuery. However, it seems that if there are any delays, (I put the thread to sleep for a second), then the results just appear instead of sliding down. If I remove the sleep thread the sliding animation is fine. I've got the code below to execute the JQuery once the AJAX is loaded: <script type="text/javascript"> var prm = Sys.WebForms.PageRequestManager.getInstance(); prm.add_pageLoaded(showDiv); function showDiv(sender, args){ $("#results_bar").slideDown('slow'); } </script> Any ideas why the animation is skipped if there's a delay? Thanks

    Read the article

  • TserverSocket and TClientSocket

    - by Georgi Gavrilski
    I use this code to reveive data : But It's not work.Can you Help me ? procedure TForm1.ServerSocket1ClientRead(Sender: TObject; Socket: TCustomWinSocket); var i:integer; sRec : string; begin for i := 0 to ServerSocket1.Socket.ActiveConnections-1 do begin with ServerSocket1.Socket.Connections[i] do begin sRec:=ReceiveText; if sRec < '' then begin if RemoteAddress='192.168.0.1' then begin if ReceiveText='1' then Btn1.Color:=clNavy; ADOQuery1.Active:=True; end; if RemoteAddress='192.168.0.1' then begin if ReceiveText='2' then Btn1.Color:=clRed; Pnl1.Visible:=True; end; end; end; end; end;

    Read the article

  • Make a c# / wpf event fire only once?

    - by Donnie
    I have a case where I want a given event to execute once, and only once. I'm trying to do it this way, but I'm having prolems (else I wouldn't be asking). Note that the following code is inside the function that decides that the event needs to be fired. EventHandler h = delegate(Object sender, EventArgs e) { FiringControl.TheEvent -= h; // <-- Error, use of unassigned local variable "h" // Do stuff } FiringControl.TheEvent += h; In general this should work because of the way scope is preserved for delegates until after they're done running, but, since h is in the process of being built when I try to use it it is still considered to be "uninitialized", apparently.

    Read the article

  • Masked Edit Extender Format Issue

    - by Kumar
    I am using an ASP.NET AJAX Masked Edit Extender to format phone numbers <asp:TextBox ID="tbPhoneNumber" runat="server" /> <ajaxToolkit:MaskedEditExtender TargetControlID="tbPhoneNumber" Mask="(999)999-9999" MaskType="Number" InputDirection="LeftToRight" ClearMaskOnLostFocus="false" ClearTextOnInvalid="false" runat="server" AutoComplete="false" /> On the page load event I am trying to populate the phone textbox as follows: protected void Page_Load(object sender, EventArgs e) { tbPhoneNumber.Text = "(394)456-310"; } So there is one number which is missing at the end to make it a valid phone number. When the page loads I expected the value in the textbox to be (394)456-310_ But it displays (_39)445-6310 Why is this happening?

    Read the article

  • C# Anonymous method variable scope problem with IEnumerable<T>

    - by PaN1C_Showt1Me
    Hi. I'm trying to iterate through all components and for those who implements ISupportsOpen allow to open a project. The problem is when the anonymous method is called, then the component variable is always the same element (as coming from the outer scope from IEnumerable) foreach (ISupportsOpen component in something.Site.Container.Components.OfType<ISupportsOpen>()) { MyClass m = new MyClass(); m.Called += new EventHandler(delegate(object sender, EventArgs e) { if (component.CanOpenProject(..)) component.OpenProject(..); }); itemsList.Add(m); } How should it be solved, please?

    Read the article

  • Grid View Pagination.

    - by Wondering
    Dear All, I have a grid view and I want to implement Pagination functionality.This is working fine. protected DataSet FillDataSet() { string source = "Database=GridTest;Server=Localhost;Trusted_Connection=yes"; con = new SqlConnection(source); cmd = new SqlCommand("proc_mygrid", con); ds = new DataSet(); da = new SqlDataAdapter(cmd); da.Fill(ds); GridView1.DataSource = ds; GridView1.DataBind(); return ds; } protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e) { int newPagenumber = e.NewPageIndex; GridView1.PageIndex = newPagenumber; GridView1.DataSource = FillDataSet(); GridView1.DataBind(); } But the problem is for each pagination I have to call FillDataSet(); Is there any way to stop that.Any other coding approach? Thanks.

    Read the article

  • Find height of ContextMenuStrip before showing it

    - by Nailuj
    I have a ContextMenuStrip (ctMenuMassEdit) that I want to display when left-clicking a button (btnMassEdit). I want the ContextMenuStrip to be displayed above the button, i.e. position (0,-ContextMenuStrip.Height) relative to the button: private void btnMassEdit_Click(object sender, EventArgs e) { ctMenuMassEdit.Show(btnMassEdit, new Point(0, -ctMenuMassEdit.Height)); } However, the Height property is 0 the first time the button is clicked (I assume the ContextMenuStrip isn't created before it is shown the first time), and the result is that the ContextMenuStrip appears on top of the button. The 2nd time I click the button however, it appears in the correct position, so the basic of my logic is at least correct. I tried adding the following before showing the ContextMenuStrip, but it didn't work as hoped: if (!ctMenuMassEdit.Created) { ctMenuMassEdit.CreateControl(); } So, is there a way I can create the ContextMenuStrip before showing it the first time, so I have the correct Height property? I could of course use the hack of showing it, hiding it and showing it again, but that doesn't seem really neat...

    Read the article

  • C# & Adding Dynamic META Tags

    - by Bry4n
    I have this code protected void Page_Load(object sender, EventArgs e) { DataSet.DestinationsDataTable GetDestinations = (DataSet.DestinationsDataTable)dta.GetData(); Page.Title = GetDestinations.Rows[0]["Meta_Title"].ToString(); HtmlMeta hm = new HtmlMeta(); HtmlHead head = (HtmlHead)Page.Header; hm.Name = GetDestinations.Rows[0]["Meta_Desc"].ToString(); hm.Content = GetDestinations.Rows[0]["Meta_Key"].ToString(); head.Controls.Add(hm); } And it's returning this error (on a content page) The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>). Thoughts?

    Read the article

< Previous Page | 83 84 85 86 87 88 89 90 91 92 93 94  | Next Page >