Search Results

Search found 17357 results on 695 pages for 'custom attributes'.

Page 20/695 | < Previous Page | 16 17 18 19 20 21 22 23 24 25 26 27  | Next Page >

  • HiddenField.Value is an empty string upon postback inside my custom control

    - by Matthew Cox
    I have a custom control that has a hidden field. Upon postback I want to obtain the value stored in it, but it's always an empty string. any thoughts? I am performing client-side manipulation of the hidden field values and have verified in firebug that the fields are correct before issue a post back Here is the setup: public class DualListPanel : SWebControl, INamingContainer { protected IList<DlpItem> UnassignedList { get; set; } protected IList<DlpItem> AssignedList { get; set; } private HiddenField assignedItemsField, unassignedItemsField; public DualListPanel() { CssClass = "DualListPanel"; EnableViewState = true; } #region ViewState protected override void LoadViewState(object savedState) { var state = savedState as object[]; UnassignedList = state[0] as List<DlpItem>; AssignedList = state[1] as List<DlpItem>; base.LoadViewState(state[2]); } protected override object SaveViewState() { object[] state = new object[3]; state[0] = UnassignedList; state[1] = AssignedList; state[2] = base.SaveViewState(); return state; } #endregion #region WebControl Overrides protected override void CreateChildControls() { assignedItemsField = new HiddenField(); assignedItemsField.ID = "HiddenAssignedItems"; assignedItemsField.EnableViewState = true; unassignedItemsField = new HiddenField(); unassignedItemsField.ID = "HiddenUnassignedItems"; unassignedItemsField.EnableViewState = true; Controls.Add(assignedItemsField); Controls.Add(unassignedItemsField); base.CreateChildControls(); } #endregion #region Item Lists Retrieval public string GetCommaDelimUnassignedItems() { return unassignedItemsField.Value; } public string GetCommaDelimAssignedItems() { return assignedItemsField.Value; } #endregion }

    Read the article

  • Event-based interaction between two custom classes

    - by Antenka
    Hello everybody. I have such problem: I have 2 custom components, which have their own nesting hierarchy ... One is container for another. I have to "familiarize them" with each other. The way I'm trying to achieve that is using global events (one side is firing and the other one is catching): Application.application.addEventListener("Hello", function (data:Event):void{ // .. some actions }); //and Application.application.dispatchEvent(new Event(Hello)); Everything is pretty good, but there's one thingy .. when I'm trying to catch the event, I can't access the class, who is catching it. E.g.: Container fires the event. Child caughts it. Then should be created the connection between container and it's child. BUT, the only thing I could acheive is passing a reference to the Container in the DynamicEvent. Is there any chance that I could access the child at the event-handler function. Or maybe there's more elegant way to solve this problem ... Any help would be greately appreciated :)

    Read the article

  • Add Custom Control to DataGridViewCell

    - by Kovscer
    Hello, I create a custom control inherited from Windows.System.Forms.Controls. This is my code of this control: public partial class MonthEventComponent : Control { private Color couleur; private Label labelEvenement; public MonthEventComponent(Color couleur_c, String labelEvenement_c ) { InitializeComponent(); this.couleur = couleur_c; this.labelEvenement.Text = labelEvenement_c; this.labelEvenement.ForeColor = couleur; this.labelEvenement.BackColor = Color.White; this.labelEvenement.TextAlign = ContentAlignment.MiddleLeft; this.labelEvenement.Dock = DockStyle.Fill; this.Controls.Add(labelEvenement); } public MonthEventComponent() { InitializeComponent(); this.couleur = Color.Black; this.labelEvenement = new Label(); this.labelEvenement.ForeColor = couleur; this.labelEvenement.BackColor = Color.White; this.labelEvenement.Text = "Evénement Initialiser"; this.labelEvenement.TextAlign = ContentAlignment.MiddleLeft; this.labelEvenement.Dock = DockStyle.Fill; this.Controls.Add(labelEvenement); } protected override void OnClick(EventArgs e) { base.OnClick(e); MessageBox.Show("Click"); } } I would like to insert this control or multiple of this control on a DataGridViewCell but i don't know how to do this. Thank you in advance for your answer, Best Regards, PS: I'm french, i'm apologize for any can of language errors.

    Read the article

  • How to use SharePoint modal dialog box to display Custom Page Part1

    - by ybbest
    In the part1 of this series, I will show you how to use the modal dialog box to display the custom page and close the page. You can download solution here. 1. Firstly, I create custom action on the list item ECB called Display Custom Page. To do so, you need to create an element item in SharePoint project and copy the following xml to the element file. <Elements xmlns="http://schemas.microsoft.com/sharepoint/"> <CustomAction Id="ReportConcern" RegistrationType="ContentType" RegistrationId="0x010100866B1423D33DDA4CA1A4639B54DD4642" Location="EditControlBlock" Sequence="107" Title="Display Custom Page" Description="To Display Custom Page in a modal dialog box on this item"> <UrlAction Url="javascript: function CallDETCustomDialog(dialogResult, returnValue) { SP.UI.ModalDialog.RefreshPage(SP.UI.DialogResult.OK); } var options = { url: '{SiteUrl}' + '/_layouts/YBBEST/TitleRename.aspx?List={ListId}&amp;ID={ItemId}', title: 'Rename title', allowMaximize: false, showClose: true, width: 500, height: 300, dialogReturnValueCallback: CallDETCustomDialog }; SP.UI.ModalDialog.showModalDialog(options);" /> </CustomAction> </Elements> 2. In your code behind, you can implement a close dialog function as below. This will close your modal dialog box once the button is clicked. protected void CloseDialog() { if (HttpContext.Current.Request.QueryString["IsDlg"] == null) return; if (!ClientScript.IsStartupScriptRegistered("CloseDialogFunction")) { const string script = "<script type='text/javascript'>" + "SP.UI.ModalDialog.commonModalDialogClose(1, 1);" + "</script>"; ClientScript.RegisterStartupScript(GetType(), "CloseDialogFunction", script); } }

    Read the article

  • How to use SharePoint modal dialog box to display Custom Page Part1

    - by ybbest
    In the part1 of this series, I will show you how to use the modal dialog box to display the custom page and close the page. You can download solution here. 1. Firstly, I create custom action on the list item ECB called Display Custom Page. To do so, you need to create an element item in SharePoint project and copy the following xml to the element file. <Elements xmlns="http://schemas.microsoft.com/sharepoint/"> <CustomAction Id="ReportConcern" RegistrationType="ContentType" RegistrationId="0x010100866B1423D33DDA4CA1A4639B54DD4642" Location="EditControlBlock" Sequence="107" Title="Display Custom Page" Description="To Display Custom Page in a modal dialog box on this item"> <UrlAction Url="javascript: function CallDETCustomDialog(dialogResult, returnValue) { SP.UI.ModalDialog.RefreshPage(SP.UI.DialogResult.OK); } var options = { url: '{SiteUrl}' + '/_layouts/YBBEST/TitleRename.aspx?List={ListId}&amp;ID={ItemId}', title: 'Rename title', allowMaximize: false, showClose: true, width: 500, height: 300, dialogReturnValueCallback: CallDETCustomDialog }; SP.UI.ModalDialog.showModalDialog(options);" /> </CustomAction> </Elements> 2. In your code behind, you can implement a close dialog function as below. This will close your modal dialog box once the button is clicked. protected void CloseDialog() { if (HttpContext.Current.Request.QueryString["IsDlg"] == null) return; if (!ClientScript.IsStartupScriptRegistered("CloseDialogFunction")) { const string script = "<script type='text/javascript'>" + "SP.UI.ModalDialog.commonModalDialogClose(1, 1);" + "</script>"; ClientScript.RegisterStartupScript(GetType(), "CloseDialogFunction", script); } }

    Read the article

  • LinqToXML removing empty xmlns attributes &amp; adding attributes like xmlns:xsi, xsi:schemaLocation

    - by Rohit Gupta
    Suppose you need to generate the following XML: 1: <GenevaLoader xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 2: xsi:schemaLocation="http://www.advent.com/SchemaRevLevel401/Geneva masterschema.xsd" 3: xmlns="http://www.advent.com/SchemaRevLevel401/Geneva"> 4: <PriceRecords> 5: <PriceRecord> 6: </PriceRecord> 7: </PriceRecords> 8: </GenevaLoader> Normally you would write the following C# code to accomplish this: 1: const string ns = "http://www.advent.com/SchemaRevLevel401/Geneva"; 2: XNamespace xnsp = ns; 3: XNamespace xsi = XNamespace.Get("http://www.w3.org/2001/XMLSchema-instance"); 4:  5: XElement root = new XElement( xnsp + "GenevaLoader", 6: new XAttribute(XNamespace.Xmlns + "xsi", xsi.NamespaceName), 7: new XAttribute( xsi + "schemaLocation", "http://www.advent.com/SchemaRevLevel401/Geneva masterschema.xsd")); 8:  9: XElement priceRecords = new XElement("PriceRecords"); 10: root.Add(priceRecords); 11:  12: for(int i = 0; i < 3; i++) 13: { 14: XElement price = new XElement("PriceRecord"); 15: priceRecords.Add(price); 16: } 17:  18: doc.Save("geneva.xml"); The problem with this approach is that it adds a additional empty xmlns arrtribute on the “PriceRecords” element, like so : 1: <GenevaLoader xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.advent.com/SchemaRevLevel401/Geneva masterschema.xsd" xmlns="http://www.advent.com/SchemaRevLevel401/Geneva"> 2: <PriceRecords xmlns=""> 3: <PriceRecord> 4: </PriceRecord> 5: </PriceRecords> 6: </GenevaLoader> The solution is to add the xmlns NameSpace in code to each child and grandchild elements of the root element like so : 1: XElement priceRecords = new XElement( xnsp + "PriceRecords"); 2: root.Add(priceRecords); 3:  4: for(int i = 0; i < 3; i++) 5: { 6: XElement price = new XElement(xnsp + "PriceRecord"); 7: priceRecords.Add(price); 8: }

    Read the article

  • List of custom Launchers & Quicklists for Unity

    - by Nik
    Creating a custom launcher for Unity is simple. Quicklists provide an easy and efficient way to quickly access commonly used tasks for a specific application. NOTE: Starting with Ubuntu 11.10, this popup option has vanished. Launchers can now only be created by editing text files in your home folder. Creating a custom launcher is easy. Right-click on your desktop and click create a launcher. Edit the .desktop file using a text editor. (More information can be found here and here.) So, which custom launchers do you use on Unity? Note: Please limit yourself to one custom launcher per answer. Also, please provide a screenshot of it in action.

    Read the article

  • Choose Custom New Tab Pages in Chrome

    - by Asian Angel
    For most people the default New Tab Page in Chrome works perfectly well for their purposes. But if you would prefer to choose what opens in a new tab for yourself then you will definitely want to have a look at the “Define your own new tab!” extension for Google Chrome. Before Unless you are using a Speed Dial (or similar) extension each time you click on the “New Tab Button” you get the same old page. It would certainly be a lot more satisfying if you could choose custom webpage(s) to open as new tabs. After Once you have the extension installed the best thing to do is click on the “New Tab Button”. That will open up the “Options Page” where you can enter one or two custom website URLs of your choosing. Once you have your custom URLs entered click on “Save”. As soon as you click on the “New Tab Button” your new custom webpage(s) will open. If you chose two webpages the first choice will open focused on the “right side” instead of the “left”. Clicking on the “Home Button” will also open the webpage(s) that you chose. The webpage(s) that you chose will also open as your starting “Home Pages” each time that you start your browser. Conclusion If you have wanted to choose your own custom “New Tab Page” then this is the extension that you have been waiting for. Links Download the Define your own new tab! extension (Google Chrome Extensions) Similar Articles Productive Geek Tips Find Similar Websites in Google ChromeAccess Google Chrome’s Special Pages the Easy WayEnable Vista Black Style Theme for Google Chrome in XPSet Custom Reload Times for Individual Webpages in ChromeEnable Auto-Paging Goodness in Google Chrome TouchFreeze Alternative in AutoHotkey The Icy Undertow Desktop Windows Home Server – Backup to LAN The Clear & Clean Desktop Use This Bookmarklet to Easily Get Albums Use AutoHotkey to Assign a Hotkey to a Specific Window Latest Software Reviews Tinyhacker Random Tips Revo Uninstaller Pro Registry Mechanic 9 for Windows PC Tools Internet Security Suite 2010 PCmover Professional Play Music in Chrome by Simply Dragging a File 15 Great Illustrations by Chow Hon Lam Easily Sync Files & Folders with Friends & Family Amazon Free Kindle for PC Download Stretch popurls.com with a Stylish Script (Firefox) OldTvShows.org – Find episodes of Hitchcock, Soaps, Game Shows and more

    Read the article

  • HTML5 data-* (custom data attribute)

    - by Renso
    Goal: Store custom data with the data attribute on any DOM element and retrieve it. Previously under HTML4 we used to use classes to store custom data, something to the affect of <input class="account void limit-5000 over-4999" /> and then have to parse the data out of the class In a book published by Peter-Paul Koch in 2007, ppk on JavaScript, he explains why and how to use custom attributes to make data more accessible to JavaScript, using name-value pairs. Accessing a custom attribute account-limit=5000 is much easier and more intuitive than trying to parse it out of a class, Plus, what if the class name for example "color-5" has a representative class definition in a CSS stylesheet that hides it away or worse some JavaScript plugin that automatically adds 5000 to it, or something crazy like that, just because it is a valid class name. As you can see there are quite a few reasons why using classes is a bad design and why it was important to define custom data attributes in HTML5. Syntax: You define the data attribute by simply prefixing any data item you want to store with any HTML element with "data-". For example to store our customers account data with a hidden input element: <input type="hidden" data-account="void" data-limit=5000 data-over=4999  /> How to access the data: account  -     element.dataset.account limit    -     element.dataset.limit You can also access it by using the more traditional get/setAttribute method or if using jQuery $('#element').attr('data-account','void') Browser support: All except for IE. There is an IE hack around this at http://gist.github.com/362081. Special Note: Be AWARE, do not use upper-case when defining your data elements as it is all converted to lower-case when reading it, so: data-myAccount="A1234" will not be found when you read it with: element.dataset.myAccount Use only lowercase when reading so this will work: element.dataset.myaccount

    Read the article

  • List of custom Launchers & Quicklists for Unity

    - by Nik
    Creating a custom launcher for unity is simple. Quicklists provide a easy and efficient way to quickly access commonly used tasks for a specific application. The steps to create a custom launcher is easy. Right-click on your desktop and click create a launcher. Edit the .desktop file using a text editor and using this you can create static quicklists for the Unity. (more info here and here) So what custom launchers do you use on Unity? Note: Please limit one answer per custom launcher. Also please do provide a screenshot of it in action.

    Read the article

  • Attributes of an Ethical Programmer?

    - by ahmed
    Software that we write has ramifications in the real world. If not, it wouldn't be very useful. Thus, it has the potential to sweep across the world faster than a deadly manmade virus or to affect society every bit as much as genetic manipulation. Maybe we can't see how right now, but in the future our code will have ever-greater potential for harm or good. Of course, there's the issue of hacking. That's clearly a crime. Or is it that clear? Isn't hacking acceptable for our government in the event of national security? What about for other governments? Cases of life-and-death emergency? Tracking down deadbeat parents? Screening the genetic profile of job candidates? Where is the line drawn? Who decides? Do programmers have responsibility for how their code is used? What if a programmer writes code to pry into confidential information or copy-protected material? Does he bear responsibility along with the person who used the program? What about a programmer who knowingly or unknowingly writes code to "fix the books?" Should he be liable?

    Read the article

  • Caller Info Attributes in C# 5.0

    - by Jalpesh P. Vadgama
    In c# 5.0 Microsoft has introduced a Caller information attribute. It’s a new feature that is introduced in C# 5.0 and very useful if you want to log your code activities. With the help of this you can implement the log functionality very easily. It can help any programmer in tracing, debugging and diagnostic of any application. With the help of Caller Information we can get following information over there. CallerFilePathAttribute: With help of  this attribute we can get full path of source file that contains caller. This will be file path from which contains caller at compile time. CallerLineNumberAttribute:  With the help of this attribute we can get line number of source file which the method is called. CallerMemberNameAttribute: With the help of this attribute we can get the method or property name of the caller. Read more

    Read the article

  • Burg Custom Icons work only with specific themes

    - by el10780
    I have made a custom icon for burg loader for my Lenovo Recovery Partition.I have made 3 icons : large_qdrive.png (128 X 128 pixels) small_qdrive.png (24 X 24 pixels) grey_qdrive.png (128 x 128 pixels) The .png icons that I created I made them using gimp from a qdrive.ico file that I found in the Lenovo Recovery Partition. I transferred the icons to the /boot/burg/themes/icons folder and I added to the class list of the grey,large,small and the hover files the following lines : -qdrive { image = "$$/large_qdrive.png" } in the large file -qdrive { image = "$$/small_qdrive.png" } in the small file -qdrive { image = "$$/grey_qdrive.png" } in the grey file -qdrive { image = "$$/grey_qdrive.png:$$/large_qdrive.png" } in the hover file I ran sudo update-burg and after that I modified the following line in the burg.cfg file : menuentry "Windows 7 (loader) (on /dev/sda2)" --class windows --class os { to menuentry "Windows 7 (loader) (on /dev/sda2)" --class qdrive --class os { and I also tried to change the title for the Lenovo Recovery Partition,so I tried this as well: menuentry "Lenovo Recovery Partition (on /dev/sda2)" --class qdrive --class os { None of this tries enforced actually burg loader to use the custom icon that I made and I can't figure out why. I have to mention also that there are a few themes that I have installed in burg which actually are able to use the small_qdrive.png icon that I made,but all the others which use either the large_qdrive.png or the grey_qdrive.png weren't able to use the custom icons. I have double checked for typos in all the files that I have created or I modified,so I am pretty sure that I haven't misspelled anything. I have checked also the title of the custom icons that I made and neither of them have a typo. I have looked also if there are any other folder that the themes might use to retrieve the icons,but it seems that all of them except for **Fortune** theme,which I downloaded from OMG!UBUNTU,use the icons folder which is located in /boot/burg/themes/icons I tried to add the custom icons to the icons folder of the theme **Fortune**,but still nothing happened.

    Read the article

  • OpenGL Vertex Attributes - Normalisation

    - by Daniel
    Alas, I have searched, and have found no definitive answer. When would you normalize the vertex data in OpenGL using the following command: glVertexAttribPointer(index, size, type, normalize, stride, pointer); I.e when would normalize == GL_TRUE; what situations, and why would you choose to let the GPU do the calculations instead of preprocessing it? All examples I have ever seen, have this set to GL_FALSE; and I cannot personally see a use for it. But Khronos aren't stupid, so it must be there for something useful (and probably common).

    Read the article

  • Update Boolean attributes from another controller

    - by sidonstackoverflow
    I have Users controller and session controller . I want to update one user attribute from session controller . How can i do that ?? I am currently using rails 4.0 . Users controller: class UsersController < ApplicationController def show if Spec.find_by_user_id params[:id] @user = User.find(params[:id]) @spec = Spec.find_by_user_id params[:id] else if params[:id] == session[:id] redirect_to spec_edit_path(params[:id]) else redirect_to(community_index_path, {:notice => "Sorry there was an error"}) end end end def index end def new @user = User.new end def create @user = User.new(user_params) if @user.save flash[:success] = "Welcome buddy !" redirect_to @user else render 'new' end end private def user_params params.require(:user).permit(:name, :email, :password, :password_confirmation) end end Sessions Controller : class SessionsController < ApplicationController def new end def create user = User.find_by(email: params[:session][:email]) if user && user.authenticate(params[:session][:password]) session[:user_id] = user.id User.update(user.status, 'true') redirect_to root_url, :notice => 'You successfully logged in ' else flash.now[:error] = 'Invalid email/password combination' # Not quite right! render 'new' end end def destroy session[:user_id] = nil redirect_to root_url, :notice => 'You successfully logged out ' end end In above code when User logged in i just want to update my boolean column status at users table from sessions controller , but i failed . I am thankful to whom would like to answer my question !

    Read the article

  • More than 5 custom variables across multiple websites using Google Analytics

    - by brakes
    We have multiple websites using the same Google Analytics account number so we can track visitors across multiple websites. One of these websites has set 5 custom variables. We want to introduce a new custom variable to track logged in users for our single sign-on (SSO) system to find out what parts of which website they are accessing. Is this possible or is it a case that all the custom variables have been used up by 1 of the sites?

    Read the article

< Previous Page | 16 17 18 19 20 21 22 23 24 25 26 27  | Next Page >