Search Results

Search found 5586 results on 224 pages for 'global illumination'.

Page 132/224 | < Previous Page | 128 129 130 131 132 133 134 135 136 137 138 139  | Next Page >

  • IComponentActivator Instance

    - by jeffn825
    How can I use an IComponentActivator instance for a component, not just specifying a type. That is, instead of Component.For<XYZ>.Activator<MyComponentActivator>(); I want to be able say Component.For<XYZ>.Activator(new MyComponentActivator(someImportantRuntimeInfo)); Also, is there a way I can choose an activator dynamically for a non specifically registered component? That is, I want to have an activator that looks at the type being resolved, decides if it can activate it, and if not, responsibility for activation should be passed on to the default activator. So basically I want a global IComponentActivator that has the following logic: Create(Type type){ if (ShouldActivate(type)){ DoActivate(type); } else{ // do default activation here somehow } } Thanks!

    Read the article

  • Not able to use cutomized Ajax HTML editor from code behind

    - by KhanS
    I am customizing the ajax html editor. I am creating a class which derives from ajax html editor, and overriding FillTopToolbar() method to have limited toolbar buttons. I am trying to use this in my aspx page. <%@ Register namespace="Content" tagprefix="edit" %> <edit:MyEditor runat="server" Width="100%" Height="250px"/> I am able to see the editor in my aspx page. The problem comes when I give an ID to the control <edit:QNAEditor ID="htmlEditor" runat="server" Width="100%" Height="250px"/> I get an error in the designer file in the below line. protected global::Content.MYHTMLEditor htmlEditor; I am not able to use it in code behind. I am using VS 2010. Please help me in this regard.

    Read the article

  • Why does Joomla debug show 446 queries logged and 446 legacy queries logged?

    - by Darye
    I have been called in to fix the performance of a Joomla site that was already setup. I look at the debug output and it shows the same queries twice, once for queries logged and again for legacy queries logged. My guess is that it is actually running the same queries twice make for just under 900 queries per page (hope I am wrong) The Legacy plugin is disabled, so Legacy mode is not on at all. The site uses VirtueMart as well (which BTW isn't working properly if the cache in the Global Config is turned on) Besides the fact that I don't think it should be running 446 queries anyway (sometimes even up to 650 per page ), has anyone every experienced this issue, and where would I look to fix this. Thanks

    Read the article

  • MinGW Doesn't Generate an Object File When Compiling

    - by Nathan Campos
    I've just bought a new laptop for me on the travel, then on my free time, I've started to test MinGW on it by trying to compile my own OS that is written in C++, then I've created all the files needed and the kernel.cpp: extern "C" void _main(struct multiboot_data* mbd, unsigned int magic); void _main( struct multiboot_data* mbd, unsigned int magic ) { char * boot_loader_name =(char*) ((long*)mbd)[16]; /* Print a letter to screen to see everything is working: */ unsigned char *videoram = (unsigned char *) 0xb8000; videoram[0] = 65; /* character 'A' */ videoram[1] = 0x07; /* forground, background color. */ } And tried to compile it with g++ G: g++ -o C:\kernel.o -c kernel.cpp -Wall -Wextra -Werror -nostdlib -nostartfiles -nodefaultlibs kernel.cpp: In function `void _main(multiboot_data*, unsigned int)': kernel.cpp:8: warning: unused variable 'boot_loader_name' kernel.cpp: At global scope: kernel.cpp:4: warning: unused parameter 'magic' G: But it don't create any binary file at C:/. What can I do?

    Read the article

  • Newbie questions about COM

    - by smwikipedia
    Hi, I am quite new to COM so the question may seem naive. Q1. About Windows DLL Based on my understanding, a Windows DLL can export functions, types(classes) and global variables. Is this understanding all right? Q2. About COM My naive understanding is that: a COM DLL seems to be just a new logical way to organize the functions and types exported by a standard Windows DLL. A COM DLL exports both functions such as DllRegisterServer() and DllGetClassObject(), and also the Classes which implements the IUnknown interface. Is this understanding all right? Q3. *.def & *.idl *.def is used to define the functions exported by a Windows DLL in the traditional way, such as DllGetClassObject(). *.idl is used to define the interface implemented by a COM coclass. Thanks in advance.

    Read the article

  • URL Routing with WebForms, what to do with additional querystrings like page number, filter, etc?

    - by Scott
    I am switching from Intelligencia's UrlRewriter to the new web forms routing in ASP.NET 4.0. I have it working great for basic pages, however, in my e-commerce site, when browsing category pages, I previously used querystrings that were built into my pager control to control paging. An old url (with UrlRewriting) would be: http://www.mysite.com/Category/Arts-and-Crafts_17 I have a MapPageRoute defined in global.asax as: routes.MapPageRoute("category-browse", "Category/{name}_{id}", ~/CategoryPage.aspx"); This works great. Now, somebody clicks to go to page 2. Previously I would have just tacked on ?page=2 as the querystring. Now, How do I handle this using web forms routing? I know I can do something like: http://www.mysite.com/Category/Arts-and-Crafts_17/page/2 But in addition to page, I can have filters, age ranges, gender, etc. Should I just keep defining routes that handle these variables, or should I continue using querystrings and can I define a route that allows me to use my querstrings like before?

    Read the article

  • How to organized page specific CSS link tags with spark view pages and application.spark

    - by dbr
    I'm currently using ASP.NET MVC 2 and the spark view engine. The main master page (application.spark) contains all of the CSS link tags that need to be present for all pages (global stuff). However, I have some content pages that have page specific CSS tags and currently I'm just sticking the link tag in the body as something like: <content name="MainContent"> <!-- page specific csss --> <link rel="stylesheet" href="/Content/css/page_specific.css" /> My problem is that when the page renders, this tag ends up in the which is not where it needs to be. Is there a solution for this? One idea I had was to check the controller in the Application.spark page and write out which page specific css file is required for that particular controller, however, that solution doesn't seem to scale well and I would imagine there is some way of creating the link in the child page and having it render where it's supposed to by the browser.

    Read the article

  • Readline, the Input Record Separator and Ruby

    - by JustSmith
    In Ruby I'm looking to read data until I reach a delimiter or end of file. I found this is possible by redefining $/ or the $INPUT_RECORD_SEPARATOR to my delimiter. However with all the "features" in the Ruby language it seems hokey to change the value of a global to do this. Also, readline used to consume the delimiter while not it is included in what is returned. Is there any other way to "read until" while consuming the delimiter that doesn't involve getting the values char by char in a loop?

    Read the article

  • C++ Mutexes and STL Lists Across Subclasses

    - by Genesis
    I am currently writing a multi-threaded C++ server using Poco and am now at the point where I need to be keeping information on which users are connected, how many connections each of them have, and given it is a proxy server, where each of those connections are proxying through to. For this purpose I have created a ServerStats class which holds an STL list of ServerUser objects. The ServerStats class includes functions which can add and remove objects from the list as well as find a user in the list an return a pointer to them so I can access member functions within any given ServerUser object in the list. The ServerUser class contains an STL list of ServerConnection objects and much like the ServerStats class it contains functions to add, remove and find elements within this list. Now all of the above is working but I am now trying to make it threadsafe. I have defined a Poco::FastMutex within the ServerStats class and can lock/unlock this in the appropriate places so that STL containers are not modified at the same time as being searched for example. I am however having an issue setting up mutexes within the ServerUser class and am getting the following compiler error: /root/poco/Foundation/include/Poco/Mutex.h: In copy constructor âServerUser::ServerUser(const ServerUser&)â: src/SocksServer.cpp:185: instantiated from âvoid __gnu_cxx::new_allocator<_Tp::construct(_Tp*, const _Tp&) [with _Tp = ServerUser]â /usr/include/c++/4.4/bits/stl_list.h:464: instantiated from âstd::_List_node<_Tp* std::list<_Tp, _Alloc::_M_create_node(const _Tp&) [with _Tp = ServerUser, _Alloc = std::allocator]â /usr/include/c++/4.4/bits/stl_list.h:1407: instantiated from âvoid std::list<_Tp, _Alloc::_M_insert(std::_List_iterator<_Tp, const _Tp&) [with _Tp = ServerUser, _Alloc = std::allocator]â /usr/include/c++/4.4/bits/stl_list.h:920: instantiated from âvoid std::list<_Tp, _Alloc::push_back(const _Tp&) [with _Tp = ServerUser, _Alloc = std::allocator]â src/SocksServer.cpp:301: instantiated from here /root/poco/Foundation/include/Poco/Mutex.h:164: error: âPoco::FastMutex::FastMutex(const Poco::FastMutex&)â is private src/SocksServer.cpp:185: error: within this context In file included from /usr/include/c++/4.4/x86_64-linux-gnu/bits/c++allocator.h:34, from /usr/include/c++/4.4/bits/allocator.h:48, from /usr/include/c++/4.4/string:43, from /root/poco/Foundation/include/Poco/Bugcheck.h:44, from /root/poco/Foundation/include/Poco/Foundation.h:147, from /root/poco/Net/include/Poco/Net/Net.h:45, from /root/poco/Net/include/Poco/Net/TCPServerParams.h:43, from src/SocksServer.cpp:1: /usr/include/c++/4.4/ext/new_allocator.h: In member function âvoid __gnu_cxx::new_allocator<_Tp::construct(_Tp*, const _Tp&) [with _Tp = ServerUser]â: /usr/include/c++/4.4/ext/new_allocator.h:105: note: synthesized method âServerUser::ServerUser(const ServerUser&)â first required here src/SocksServer.cpp: At global scope: src/SocksServer.cpp:118: warning: âstd::string getWord(std::string)â defined but not used make: * [/root/poco/SocksServer/obj/Linux/x86_64/debug_shared/SocksServer.o] Error 1 The code for the ServerStats, ServerUser and ServerConnection classes is below: class ServerConnection { public: bool continue_connection; int bytes_in; int bytes_out; string source_address; string destination_address; ServerConnection() { continue_connection = true; } ~ServerConnection() { } }; class ServerUser { public: string username; int connection_count; string client_ip; ServerUser() { } ~ServerUser() { } ServerConnection* addConnection(string source_address, string destination_address) { //FastMutex::ScopedLock lock(_connection_mutex); ServerConnection connection; connection.source_address = source_address; connection.destination_address = destination_address; client_ip = getWord(source_address, ":"); _connections.push_back(connection); connection_count++; return &_connections.back(); } void removeConnection(string source_address) { //FastMutex::ScopedLock lock(_connection_mutex); for(list<ServerConnection>::iterator it = _connections.begin(); it != _connections.end(); it++) { if(it->source_address == source_address) { it = _connections.erase(it); connection_count--; } } } void disconnect() { //FastMutex::ScopedLock lock(_connection_mutex); for(list<ServerConnection>::iterator it = _connections.begin(); it != _connections.end(); it++) { it->continue_connection = false; } } list<ServerConnection>* getConnections() { return &_connections; } private: list<ServerConnection> _connections; //UNCOMMENTING THIS LINE BREAKS IT: //mutable FastMutex _connection_mutex; }; class ServerStats { public: int current_users; ServerStats() { current_users = 0; } ~ServerStats() { } ServerUser* addUser(string username) { FastMutex::ScopedLock lock(_user_mutex); for(list<ServerUser>::iterator it = _users.begin(); it != _users.end(); it++) { if(it->username == username) { return &(*it); } } ServerUser newUser; newUser.username = username; _users.push_back(newUser); current_users++; return &_users.back(); } void removeUser(string username) { FastMutex::ScopedLock lock(_user_mutex); for(list<ServerUser>::iterator it = _users.begin(); it != _users.end(); it++) { if(it->username == username) { _users.erase(it); current_users--; break; } } } ServerUser* getUser(string username) { FastMutex::ScopedLock lock(_user_mutex); for(list<ServerUser>::iterator it = _users.begin(); it != _users.end(); it++) { if(it->username == username) { return &(*it); } } return NULL; } private: list<ServerUser> _users; mutable FastMutex _user_mutex; }; Now I have never used C++ for a project of this size or mutexes for that matter so go easy please :) Firstly, can anyone tell me why the above is causing a compiler error? Secondly, can anyone suggest a better way of storing the information I require? Bear in mind that I need to update this info whenever connections come or go and it needs to be global to the whole server.

    Read the article

  • Spark compiled views locating

    - by Gopher
    Hello I have a problem with Spark. I have compiled assembly with views, located in bin subfolder of website, that i created like below engine.BatchCompilation(targetFolder, Global.AllKnownDescriptors()); On start of my app, a try to load compiled views: svf.Engine.LoadBatchCompilation(Assembly.LoadFrom(Path.Combine(basePath, "SharedViews.dll"))); When debugging, i can see that this was successfull. But ViewEngine doesn't find that views. It even doesn'n look for them in CompiledViewHolder where they are located. May that problem be caused ny wrong IViewFolder? Or i should do something more to use compiled views? Thanks

    Read the article

  • How can I stop IIS7 from using HttpHandlers?

    - by mcintyre321
    I'm having a bit of a play around with IIS7, just trying to catch events manually in global.asax and skip the ASP pipeline entirely. To this end, I've set <httpHandlers> <clear/> </httpHandlers> <httpModules> <clear/> </httpModules> but when I call the server I get a YSOD [HttpException]: No http handler was found for request type 'GET' at System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig) at System.Web.HttpApplication.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) What do I need to do to completely prevent IIS from handling things? What I want is just to do Response.Writes in event handlers and async methods set up in HttpApplication.Init

    Read the article

  • How to set WCF threads to schedual differently

    - by Gilad
    Hi, I'm running a winservice that has 2 main objectives. Execute/Handle exposed webmethods. Run Inner processes that consume allot of CPU. The problem is that when I execute many inner processes |(as tasks) that are queued to the threadpool or taskpool, the execution of the webmethods takes much more time as WCF also queues its executions to the same threadpool. This even happens when setting the inner processes task priority to lowest and setting the webmethods thread priority to heights. I hoped that Framework 4.0 would improve this, and they have, but still it takes quite allot of time for the system to handle the WCF queued tasks if the CPU is handling other inner tasks. Is it possible to change the Threadpool that WCF uses to a different one? Is it possible to manually change the task queue (global task queue, local task queue). Is it possible to manually handle 2 task queues that behave differently ? Any help in the subject would be appropriated. Gilad.

    Read the article

  • What are the CS fundamentals behind package/dependency management?

    - by Frep D-Oronge
    Often I hear about situations where companies are developing extensable in house software (the dreaded enterprise 'framework') which is supposed to support multiple 'plugins' from diffirent teams. Usually this ends up being a half baked solution that does not really work due to compatibility prolems between addins, or between addins and the framework itself. Usually this means QA have to 'rubber stamp' a global set of versions accross all plugins, or more usually plugins are released and stuff breaks in nasty ways. This problem has been solved before however, for example the package management systems like apt for debian linux. I suspect that the reason it works is that it is built from the start on a known 'Computer Science-y' concept. My question is what is it?

    Read the article

  • jQuery.ajax checking if there is already another xhr

    - by digitalFresh
    I have a page when, if the user is near the bottom of the page, loads the next page. I just recently switched it to jQuery, and now use the jQuery.ajax() function to get the data. However, now i cannot check if the xhr is already loading, making the page load multiple xhrs when the user near the bottom. My listener is: $(document).scroll(function () { if(/* scrollbar is near bottom */) loadxhr(dat++); //function that calls jQuery.ajax() } }); Basically, can you track the readyState of the call in a global scope?

    Read the article

  • adding tabs to tabcontrol from inside usercontrol

    - by Jakob
    How can I add tabs to a tabcontrol that exists in one usercontrol from another usercontrol that is contained within a tab itself?? Can I do it without passing in the tabcontrol as a parameter in the constructor, perhaps via some static global method? I've tried public static ObservableTabCollection FindCollectionFromUC(this DependencyObject depObject) { bool loop = true; var parent = (VisualTreeHelper.GetParent(depObject) as FrameworkElement); while (loop) { if (parent.GetType() is TabControl) { loop = false; return ((ObservableTabCollection)((TabControl)parent).ItemsSource); } } return null; } but this is just an infinite loop

    Read the article

  • Porting from GAE to TomCat or another servlet server

    - by bach
    Hi guys, I'm unhappy from GAE because - One can't have a global variable and the 'synchronize' keyword. Instead one have to catch a basically DB transcational exception and retry in a while loop - which will eat all my free CPU time and will start costing me money as I reach the google's qouata. Is it safe to use synchronize inside a doPost() in tomcat? (i guess that it's ok as long as all the servlets are running on on 1 VM?). If not in all tomcat configurations, how do I configure tomcat to make it safe? How can I convert a GAE app to my own tomcat server? - How to install DataNucleus Access Platform on tomcat? Best regards

    Read the article

  • How to capture any key in X?

    - by cz-david
    Hi, I am building an application for which I need to periodically get information about users keyboard. It is going to be user idle detection application. I have a fairly simple solution to periodically check if the mouse has been moved. But I can't figure any reasonable non root way to detect if the keyboard has been pressed. I was thinking about registering a hook every timer timeout and on any key press to unregister it. So if there is no key press for a long time then my program will know if the user is idle. Anyway, I couldn't find any global hooks for any key, including modifiers. Is there an easy way to do this? Or would someone have a better way to detect keyboard idleness? Thanks, David Polák

    Read the article

  • What makes a bad programming language bad?

    - by sub
    We have all seen things like the typing system of JavaScript (There is a funny post including a truth table somewhere around here). I consider this one of the main things that makes a programming language bad. Other things that spring to mind: Bad Error messages (Either obfuscated so you can't figure out whats wrong, not existing or simply too long and red) The language wasn't planned and just grew uncontrolled in all directions (PHP?) The language encourages bad programm(er/ing) habits such as: Global variables everywhere, bad variable names Inconsistent naming conventions inside the language I can't come up with any more at the moment and would be very happy to read what you think about this. What shouldn't be missing in a language created to be as bad (from the perspectives of the programmer, the company that hires to programmer, the team leader and the customer) as possible? (I ask this because I'm designing a bad, experimental language at the moment)

    Read the article

  • ASP.NET MVC 2 IgnoreRoute in all directories

    - by awex
    Hi, I switched from MVC 1 to MVC 2. I am using a file.axd httphandler in my application and I set routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); in my global routing. Since MVC 2 MVC only ignores requests to /file.axd but not to /folder/file.axd. Any changes in MVC 2? I just want to make sure that all requests in any folder to any .axd file will get processed by my httphandler. Thanks!

    Read the article

  • How to use Scala interpreter options with SBT?

    - by John Threepwood
    When using the Scala interpreter, one could start it with an option like: C:\Users\John>scala -unchecked Welcome to Scala version 2.9.2 (Java HotSpot(TM) Client VM, Java 1.6.0_32). Type in expressions to have them evaluated. Type :help for more information. scala> When using sbt, how can one start the Scala interpreter with options ? The following try will not work: C:\Users\John\Test Scala Project 1>sbt [...] [info] Loading global plugins from C:\Users\John\.sbt\plugins [info] Set current project to default-8d4ecc (in build file:/C:/Users/John/Tes t%20Scala%20Project%201/) > console -unchecked [error] Expected end of input. [error] console -unchecked [error] ^ With Google & Co I could not figure out how to do this from within the sbt shell. Does anyone know ?

    Read the article

  • pb with callback in the python optparse module

    - by PierrOz
    Hi Guys, I'm playing with Python 2.6 and its optparse module. I would like to convert one of my arguments to a datetime through a callback but it fails. Here is the code: def parsedate(option, opt_str, value, parser): option.date = datetime.strptime(value, "%Y/%m/%d") def parse_options(args): parser = OptionParser(usage="%prog -l LOGFOLDER [-e]", version="%prog 1.0") parser.add_option("-d", "--date", action="callback", callback="parsedate", dest="date") global options (options, args) = parser.parse_args(args) print option.date.strftime() if __name__ == "__main__": parse_options(sys.argv[1:]) I get an error File: optparse.py in _check_callback "callback not callable". I guess I'm doing something wrong in the way I define my callback but what ? and why ? Can anyone help ?

    Read the article

  • How to create a custom yaml config file in Symfony

    - by Guillaume Flandre
    What I want to do is quite simple: store data in a custom config file that I want to read later on. I created my file something.yml that I put in the global config directory. It looks like that: prod: test: ok dev: test: ko all: foo: bar john: doe Then I copied the config_handlers.yml and also put it in the config directory and added the following at the top of the file: config/something.yml: class: sfDefineEnvironmentConfigHandler param: prefix: something_ But if I'm calling sfConfig::get("something_foo"); I keep getting NULL. What did I do wrong? I just want to read values, so no need to create a custome config handler, right? I've read the doc here: http://www.symfony-project.org/book/1_2/19-Mastering-Symfony-s-Configuration-Files even though I'm running 1.4 (I don't think that changed since then). Edit: Of course I can use sfYaml::load() but I'd like to do things in a better way.

    Read the article

  • List getting cleared every button click inside Update Panel?

    - by sah302
    No this isn't a copy of this question: http://stackoverflow.com/questions/654423/button-in-update-panel-is-doing-a-full-postback I've got a drop down inside an update panel, and I am trying to get it to allow the person using the page to add users to a list that is bound to a gridview. The list is a global variable, and on page_load I set that to the gridview's datasource and databind it. However, anytime I click the 'add a user' button, or the button to remove the user from the list. It appears like it is doing a full post back even though all these elements are inside the update Panel. Code Behind: Public accomplishmentTypeDao As New AccomplishmentTypeDao() Public accomplishmentDao As New AccomplishmentDao() Public userDao As New UserDao() Public facultyDictionary As New Dictionary(Of Guid, String) Public facultyList As New List(Of User) Public associatedFaculty As New List(Of User) Public facultyId As New Guid Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Page.Title = "Add a New Faculty Accomplishment" ddlAccomplishmentType.DataSource = accomplishmentTypeDao.getEntireTable() ddlAccomplishmentType.DataTextField = "Name" ddlAccomplishmentType.DataValueField = "Id" ddlAccomplishmentType.DataBind() facultyList = userDao.getListOfUsersByUserGroupName("Faculty") For Each faculty As User In facultyList facultyDictionary.Add(faculty.Id, faculty.LastName & ", " & faculty.FirstName) Next If Not Page.IsPostBack Then ddlFacultyList.DataSource = facultyDictionary ddlFacultyList.DataTextField = "Value" ddlFacultyList.DataValueField = "Key" ddlFacultyList.DataBind() End If gvAssociatedUsers.DataSource = associatedFaculty gvAssociatedUsers.DataBind() End Sub Protected Sub deleteUser(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.CommandEventArgs) facultyId = New Guid(e.CommandArgument.ToString()) associatedFaculty.Remove(associatedFaculty.Find(Function(user) user.Id = facultyId)) gvAssociatedUsers.DataBind() upAssociatedFaculty.Update() End Sub Protected Sub btnAddUser_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnAddUser.Click facultyId = New Guid(ddlFacultyList.SelectedValue) associatedFaculty.Add(facultyList.Find(Function(user) user.Id = facultyId)) gvAssociatedUsers.DataBind() upAssociatedFaculty.Update() End Sub Markup: <asp:ScriptManager ID="ScriptManager1" runat="server"> </asp:ScriptManager> <asp:UpdatePanel ID="upAssociatedFaculty" runat="server" UpdateMode="Conditional"> <ContentTemplate> <p><b>Created By:</b> <asp:Label ID="lblCreatedBy" runat="server"></asp:Label></p> <p><b>Accomplishment Type: </b><asp:DropDownList ID="ddlAccomplishmentType" runat="server"></asp:DropDownList></p> <p><b>Accomplishment Applies To: </b><asp:DropDownList ID="ddlFacultyList" runat="server"></asp:DropDownList> &nbsp;<asp:Button ID="btnAddUser" runat="server" Text="Add Faculty" /></p> <p> <asp:GridView ID="gvAssociatedUsers" runat="server" AutoGenerateColumns="false" GridLines="None" ShowHeader="false"> <Columns> <asp:BoundField DataField="Id" HeaderText="Id" Visible="False" /> <asp:TemplateField ShowHeader="False"> <ItemTemplate> <span style="margin-left: 15px;"> <p><%#Eval("LastName")%>, <%#Eval("FirstName")%> <asp:Button ID="btnUnassignUser" runat="server" CausesValidation="false" CommandArgument='<%# Eval("Id") %>' CommandName="Delete" OnCommand="deleteUser" Text='Remove' /></p> </span> </ItemTemplate> </asp:TemplateField> </Columns> <EmptyDataTemplate> <em>There are currently no faculty associated with this accomplishment.</em> </EmptyDataTemplate> </asp:GridView> </p> </ContentTemplate> </asp:UpdatePanel> Now I thought the point of an update panel was to be able to update things inside of it without doing a full post_back and reloading the page. So if that's the case, why is it calling page_load everytime I click the buttons? I ran this code and debug and I see that even before any of the code associated with button press fires, page_load runs again. I tried putting the gvAssociatedUser.Datasource = associatedFaculty and the line below inside the Page.IsPostBack check, that prevented the page from working. I tried every combination of settings of the update panel for ChildrenAsTriggers and UpdateMode, and none of them worked. I know this is something simple, but all the combinations I've tried won't get it to work. How can I make this thing work? Edited: It wasn't causing a full postback so I was wrong as to the cause. I thought the page was doing a full post back thus resetting my associatedFaculty list global variable, but it isn't doing a full postback. The issue I am having is everytime I click btnAddUser it will add one element to the associatedFaculty list and thus bound to gvAssociatedusers. This works the first time, but the second time I click it, it overwrites the first element. So it appears like my associatedFaculty list is getting reset each time I click the button?

    Read the article

  • Targetting DataTemplate for only on certain views

    - by huseyint
    I have a DataTemplate inside a global/shared ResourceDictionary like this which targets a DataType: <DataTemplate DataType="{x:Type foo:Bar}"> <!-- My DataTemplate visual tree goes here... --> </DataTemplate> This DataTemplate replaces my all foo:Bar types on all my Views (UserControls/Windows). What I want to do is to apply this template to only certain views, keeping the other views are not affected by this DataTemplate. I can copy this DataTemplate to Resources sections of each of these view, but I don't want to copy/paste the contents of the DataTemplate which would result in maintenance headaches.

    Read the article

  • Safari extension - Too many injected scripts responding to message

    - by Philipp
    Hi, I am trying to code a safari extension similar to Bubble Translate for Chrome. when you click a button on the toolbar, it automatically translates the text currently selected to the language of your choice using the Google language API. I use the following injected script to get the highlighted text and display the result (as an alert for the time being): http://pastebin.com/bYVuQAmp I use the following global script to call the injected script if neccessary: hxxp://pastebin.com/VHaAKM5a The problem I have is the following: The script does not just get injected into the main page but also into ads and similar stuff that is embedded into the page. Due to that, the selected text gets translated multiple times because all the embedded scripts in one page respond to the message. How can I make sure that the script is injected only into the right page or only the right page responds? Thank you, Philipp

    Read the article

< Previous Page | 128 129 130 131 132 133 134 135 136 137 138 139  | Next Page >