Search Results

Search found 273 results on 11 pages for 'rana muhammad waqas'.

Page 9/11 | < Previous Page | 5 6 7 8 9 10 11  | Next Page >

  • Setting value in html control in code behind without making server control

    - by Muhammad Akhtar
    Setting value in html control in code behind without making server control <input type="text" name="txt" /> <%--Pleas note I don't want put runat=server here to get the control in code behind--%> <asp:Button ID="Button1" runat="server" Text="Button" OnClick="Button1_Click" /> Code behind protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { //If I want to initlize some value in input, how can I set here } } protected void Button1_Click(object sender, EventArgs e) { Request["txt"] // Here I am getting the value of input } Thanks

    Read the article

  • namespace extension.. galaxy file system toolkit...gmail shell drive like utility...

    - by Muhammad Adnan
    i was looking for some namespace extention to extend using c# (.net) but didn't find much help online except Galaxy Filesystem tooklkit. which are vc++ based but comes with c# and java wrapper classes... which helps me alot to start and i did. i have extended that enough now and made installer to install. it get installed successfully but don't know why, when i open it, system get stuck... :( i thought my modified version might have some problem so i tried to run Galaxy filesystem toolkit's author original version and it responded in same way as mine do :D :( now feeling bit helpless as even author is not responding my queries regarding my queries for some reason... any help would be really appreciated.... FYI: i need to have Gmail drive like stuff...

    Read the article

  • Nhibernate - getting single column from other table

    - by Muhammad Akhtar
    I have following tables Employee: ID,CompanyID,Name //CompanyID is foriegn key of Company Table Company: CompanyID, Name I want to map this to the following class: public class Employee { public virtual Int ID { get; set; } public virtual Int CompanyID { get; set; } public virtual string Name { get; set; } public virtual string CompanyName { get; set; } protected Employee() { } } here is my xml class <class name="Employee" table="Employee" lazy="true"> <id name="Id" type="Int32" column="Id"> <generator class="native" /> </id> <property name="CompanyID" column="CompanyID" type="Int32" not-null="false"/> <property name="Name" column="Name" type="String" length="100" not-null="false"/> What I need to add in xml class to map CompanyName in my result? here is my code... public ArrayList getTest() { ISession session = NHibernateHelper.GetCurrentSession(); string query = "select Employee.*,(Company.Name)CompanyName from Employee inner join Employee on Employee.CompanyID = Company.CompanyID"; ArrayList document = (ArrayList)session.CreateSQLQuery(query, "Employee", typeof(Document)).List(); return document; } but in the returned result, I am getting CompanyName is null is result set and other columns are fine. Note:In DB, tables don't physical relation Please suggest my solution ------ Thanks

    Read the article

  • Find records IN BETWEEN Date Range

    - by Muhammad Kashif Nadeem
    Please see attached image I have a table which have FromDate and ToDate. FromDate is start of some event and ToDate is end of taht event. I need to find a record if search criteria is in between range of dates. e.g. If a record has FromDate 2010/15/5 and ToDate 2010/15/25 and my criteria is FromDate 2010/5/18 and ToDate is 2010/5/21 then this record should be in search results becasue this is in the range of 15 to 25. Following is my search query (chunk of) SELECT m.EventId FROM MajorEvents WHERE ( (m.LocationID = @locationID OR @locationID IS NULL) OR M.LocationID IS NULL) AND ( CONVERT(VARCHAR(10),M.EventDateFrom,23) BETWEEN CONVERT(VARCHAR(10),@DateTimeFrom,23) AND CONVERT(VARCHAR(10),@DateTimeTo,23) OR CONVERT(VARCHAR(10),M.EventDateTo,23) BETWEEN CONVERT(VARCHAR(10),@DateTimeFrom,23) AND CONVERT(VARCHAR(10),@DateTimeTo,23) ) If Search Criteria is equal to FromDate or ToDate then results are ok e.g. If search criterai is DateFrom = 2010/5/15 AND DateTo = 2010/5/18 then this record will return becasue Date From is exactly what is DateFrom in db. OR If search criterai is DateFrom = 2010/5/22 AND DateTo = 2010/5/25 then this record will return becasue Date To is exactly what is DateTo in db But if anything in between this range it does not work Thanks for the help.

    Read the article

  • Nhibernate - Getting Exception when run a simple join query

    - by Muhammad Akhtar
    hi, I am getting issue when I run sql Query having inner join, here is what I am doing very simple ISession session = NHibernateHelper.GetCurrentSession(); string query = string.Format("select Documents.TypeId from Documents inner join DocumentTrackingItems on Documents.Id = DocumentTrackingItems.DocumentId WHERE DocumentTrackingItems.ItemStepId = {0} order by Documents.TypeId asc", 13); System.Collections.ArrayList document = (System.Collections.ArrayList)session.CreateSQLQuery(query, "document", typeof(Document)).List(); I am getting this exception Exception Details: System.IndexOutOfRangeException: Id what's wrong in my query? --- thanks

    Read the article

  • How to get <select> options either (value or text) using jQuery

    - by Muhammad Sajid
    Hello, i have a code for <select id='list'> <option value='1'>Option A</option> <option value='2'>Option B</option> <option value='3'>Option C</option> </select> and i want that how ever i select any option, it will show in an alert message. i have try <script type='text/javascript'> //var value = $("#list option[value=2]").text(); //var value = $("#list option:selected").text(); //var value = $('#list').val(); var value = $(this).val(); alert(value); </script> but fail.

    Read the article

  • Array filteration PHP

    - by Muhammad Sajid
    I have an array with values like: Array ( [0] => Array ( [parent] => Basic [parentId] => 1 [child] => Birthday [childId] => 2 ) [1] => Array ( [parent] => Basic [parentId] => 1 [child] => Gender [childId] => 3 ) [2] => Array ( [parent] => Geo [parentId] => 10 [child] => Current City [childId] => 11 ) [3] => Array ( [parent] => Known me [parentId] => 5 [child] => My personality [childId] => 7 ) [4] => Array ( [parent] => Known me [parentId] => 5 [child] => Best life moment [childId] => 8 ) ) And I want to filter this array such that their filtration based on parent index, and the final result would be like: Array ( [0] => Array ( [parent] => Basic [parentId] => 1 [child] => Array ( [0] => Birthday [1] => Gender ) ) [1] => Array ( [parent] => Geo [parentId] => 10 [child] => Array ( [0] => Current City ) ) [2] => Array ( [parent] => Known me [parentId] => 5 [child] => Array ( [0] => My personality [1] => Best life moment ) ) ) For that I coded : $filter = array(); $f = 0; for ($i=0; $i<count($menuArray); $i++) { $c = 0; for( $b = 0; $b < count($filter); $b++ ){ if( $filter[$b]['parent'] == $menuArray[$i]['parent'] ){ $c++; } } if ($c == 0) { $filter[$f]['parent'] = $menuArray[$i]['parent']; $filter[$f]['parentId'] = $menuArray[$i]['parentId']; $filter[$f]['child'][] = $menuArray[$i]['child']; $f++; } } But it results : Array ( [0] => Array ( [parent] => Basic [parentId] => 1 [child] => Array ( [0] => Birthday ) ) [1] => Array ( [parent] => Geo [parentId] => 10 [child] => Array ( [0] => Current City ) ) [2] => Array ( [parent] => Known me [parentId] => 5 [child] => Array ( [0] => My personality ) ) ) Could anyone point out my missing LOC?

    Read the article

  • Data Access from single table in sql server 2005 is too slow

    - by Muhammad Kashif Nadeem
    Following is the script of table. Accessing data from this table is too slow. SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[Emails]( [id] [int] IDENTITY(1,1) NOT NULL, [datecreated] [datetime] NULL CONSTRAINT [DF_Emails_datecreated] DEFAULT (getdate()), [UID] [nvarchar](250) COLLATE Latin1_General_CI_AS NULL, [From] [nvarchar](100) COLLATE Latin1_General_CI_AS NULL, [To] [nvarchar](100) COLLATE Latin1_General_CI_AS NULL, [Subject] [nvarchar](max) COLLATE Latin1_General_CI_AS NULL, [Body] [nvarchar](max) COLLATE Latin1_General_CI_AS NULL, [HTML] [nvarchar](max) COLLATE Latin1_General_CI_AS NULL, [AttachmentCount] [int] NULL, [Dated] [datetime] NULL ) ON [PRIMARY] Following query takes 50 seconds to fetch data. select id, datecreated, UID, [From], [To], Subject, AttachmentCount, Dated from emails If I include Body and Html in select then time is event worse. indexes are on: id unique clustered From Non unique non clustered To Non unique non clustered Tabls has currently 180000+ records. There might be 100,000 records each month so this will become more slow as time will pass. Does splitting data into two table will solve the problem? What other indexes should be there?

    Read the article

  • Show values in TDropDownList in PRADO.

    - by Muhammad Sajid
    I m new to PRADO, I have a file Home.page with code: <%@ Title="Contact List" %> <h1>Contact List</h1> <a href="<%= $this->Service->constructUrl('insert')%>">Create New Contact</a> <br/> <com:TForm> <com:TDropDownList ID="personInfo"> <com:TListItem Value="value 1" Text="item 1" /> <com:TListItem Value="value 2" Text="item 2" Selected="true" /> <com:TListItem Value="value 3" Text="item 3" /> <com:TListItem Value="value 4" Text="item 4" /> </com:TDropDownList> </com:TForm> & Home.php with code <?php class Home extends TPage { /** * Populates the datagrid with user lists. * This method is invoked by the framework when initializing the page * @param mixed event parameter */ public function onInit($param) { parent::onInit($param); // fetches all data account information $rec = ContactRecord::finder()->findAll(); } } ?> the $rec contain array of all values. Now I want to show all name in Dropdown list. I tried my best but fail. Can anyone help me? Thanks

    Read the article

  • CakePHP hasMany relationship with multiple columns

    - by Muhammad Yasir
    Hi, I am using CakePHP framework to build a web application. The simplest form of my problem is this: I have a users table and a messages table with corresponding models. Messages are sent from a user to another user. So messages table has columns from_id and to_id in it, both referencing to id of users. I am able to link Message model to User model by using $belongsTo but I am unable to link User model with Message model (in reverse direction) by using $hasMany in the same manner. var $hasMany = array( 'From' => array( 'className' => 'Message', 'foreignKey' => 'from_id', 'dependent' => false, 'conditions' => '', 'fields' => '', 'order' => '', 'limit' => '', 'offset' => '', 'exclusive' => '', 'finderQuery' => '', 'counterQuery' => '' ), 'To' => array( 'className' => 'Message', 'foreignKey' => 'to_id', 'dependent' => false, 'conditions' => '', 'fields' => '', 'order' => '', 'limit' => '', 'offset' => '', 'exclusive' => '', 'finderQuery' => '', 'counterQuery' => '' ) ); What can do here? Any ideas? Thanks for any help.

    Read the article

  • Replace images in a DIV using javascript.

    - by Muhammad Sajid
    Hi, I want to show different images in a DIV, the turn of an image depend on a random number. The image name is like 1.gif, 2.gif, .. 6.gif to do that I coded var img = document.createElement("IMG"); img.src = "images/1.gif"; document.getElementById('imgDiv').appendChild(img); but it does not replace the old image how ever it add an another image right in the bottom of first image. syntax for DIV is: <div id="imgDiv" style="width:85px; height:100px; margin:0px 10px 10px 375px;"></div> may u halp me ?

    Read the article

  • Opening a file in c++ by using a string array of adress

    - by muhammad-aslam
    Hello guYz plz help me out in making it possible to open the files by the adress provided in an array of strings......... a way to open file is as given below... ifstream infile; infile.open("d:\aslam.txt"); but how can i open file providing an array of string as an adress of file..... like this infile.open(arr[i]); (but its not working) plz help me.........

    Read the article

  • install barnyard2 ubuntu 12.04

    - by Muhammad Ardiansyah
    I trying to install barnyard2 in ubuntu 12.04 32-bit I'm configure using syntax: ./configure --with-mysql-libraries=/usr/lib/x86_64-linux-gnu and when I trying to compile daq-1.1.1 using a makefile, I encountered the following errors: make[3]: Leaving directory /root/snortinstall/barnyard2/src' make[2]: Leaving directory/root/snortinstall/barnyard2/src' Making all in etc make[2]: Entering directory /root/snortinstall/barnyard2/etc' make[2]: Nothing to be done forall'. make[2]: Leaving directory /root/snortinstall/barnyard2/etc' Making all in doc make[2]: Entering directory/root/snortinstall/barnyard2/doc' make[2]: Nothing to be done for all'. make[2]: Leaving directory /root/snortinstall/barnyard2/doc' Making all in rpm make[2]: Entering directory /root/snortinstall/barnyard2/rpm' make[2]: Nothing to be done forall'. make[2]: Leaving directory /root/snortinstall/barnyard2/rpm' Making all in schemas make[2]: Entering directory/root/snortinstall/barnyard2/schemas' make[2]: Nothing to be done for all'. make[2]: Leaving directory /root/snortinstall/barnyard2/schemas' Making all in m4 make[2]: Entering directory /root/snortinstall/barnyard2/m4' make[2]: Nothing to be done forall'. make[2]: Leaving directory /root/snortinstall/barnyard2/m4' make[2]: Entering directory /root/snortinstall/barnyard2' make[2]: Nothing to be done for all-am'. make[2]: Leaving directory/root/snortinstall/barnyard2' make[1]: Leaving directory `/root/snortinstall/barnyard2'

    Read the article

  • php regex replace slashes and spaces and hyphens

    - by Muhammad Shahzad
    I have fews combinations of strings that I need to bring in to one pattern, that is multiple spaces should be removed, double hyphens should be replaced with single hypen, and single space should be replaced with single hyphen. I have already tried this expression. $output = preg_replace( "/[^[:space:]a-z0-9]/e", "", $output ); $output = trim( $output ); $output = preg_replace( '/\s+/', '-', $output ); But this fails in few combinations. I need help in making all of these combinations to work perfectly: steel-black steel- black steel black I should also remove any of these as well "\r\n\t".

    Read the article

  • Generated sql from LINQ to SQL

    - by Muhammad Kashif Nadeem
    Following code ProductPricesDataContext db = new ProductPricesDataContext(); var products = from p in db.Products where p.ProductFields.Count > 3 select new { ProductIDD = p.ProductId, ProductName = p.ProductName.Contains("hotel"), NumbeOfProd = p.ProductFields.Count, totalFields = p.ProductFields.Sum(o => o.FieldId + o.FieldId) }; Generated follwing sql SELECT [t0].[ProductId] AS [ProductIDD], (CASE WHEN [t0].[ProductName] LIKE '%hotel%' THEN 1 WHEN NOT ([t0].[ProductName] LIKE '%hotel%') THEN 0 ELSE NULL END) AS [ProductName], ( SELECT COUNT(*) FROM [dbo].[ProductField] AS [t2] WHERE [t2].[ProductId] = [t0].[ProductId] ) AS [NumbeOfProd], ( SELECT SUM([t3].[FieldId] + [t3].[FieldId]) FROM [dbo].[ProductField] AS [t3] WHERE [t3].[ProductId] = [t0].[ProductId]) AS [totalFields] FROM [dbo].[Product] AS [t0] WHERE (( SELECT COUNT(*) FROM [dbo].[ProductField] AS [t1] WHERE [t1].[ProductId] = [t0].[ProductId] )) > 3 Why is this CASE statement for ProductName and because of this instead of ProductName i am just getting 0 in my result set. It should generate sql like following, (where ProductName like '%hotel%' SELECT [t0].[ProductId] AS [ProductIDD], [ProductName], ( SELECT COUNT(*) FROM [dbo].[ProductField] AS [t2] WHERE [t2].[ProductId] = [t0].[ProductId] ) AS [NumbeOfProd], ( SELECT SUM([t3].[FieldId] + [t3].[FieldId]) FROM [dbo].[ProductField] AS [t3] WHERE [t3].[ProductId] = [t0].[ProductId]) AS [totalFields] FROM [dbo].[Product] AS [t0] WHERE (( SELECT COUNT(*) FROM [dbo].[ProductField] AS [t1] WHERE [t1].[ProductId] = [t0].[ProductId] )) > 3 AND t0.ProductName like '%hotel%' Thanks.

    Read the article

  • How do i connect with dart community to suggest something

    - by Muhammad Umer
    I am new to this stackoverflow and programming. So HI!!!! What i hope to do is tell something that i think is important to Dart community. If somehow it was possible to code android and or iphone apps using dart that would be very awesome and same for Dart.... There is one path, that is making program in dart compiling it to javascript and then making app using Adobe air..... .But looks inefficient. so is there any other way which i am unaware of, via which i can build an android app at least.. using dart i know you can build an app, using javascript..and css+html...so i am looking for html+css+dart. It'd be cool if adobe air supports dart language directly.

    Read the article

< Previous Page | 5 6 7 8 9 10 11  | Next Page >