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

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

How do I handle IsSelected Condition in multiple DataTriggers case ?

Posted By:      Posted Date: April 10, 2011    Points: 0   Category :JQuery

Hi all,

I have a customize listBox in which I am defining a DatatTemplete for that ListBox, the code is something like:



<ListBox Name="lstOfImages" 
     Background="Red" >          



            <Grid x:Name="mainGrid">

                 <ColumnDefinition Width="38"/>
                 <ColumnDefinition Width="*"/>

               <Image x:Name="FirstCulomnPanel"

               <Border x:Name="SecondCulomnPanel"

View Complete Post

More Related Resource Links

how to multiple condition in if statement in asp.net C#



i am using if condition to find out a time

if(time=="08 AM)


response.write"shift A";


but problem is how can i put multiple condition in if like

if(time=="06 AM" and "08 AM" and "07 AM")

Multiple forms on the same page MVC2: how to handle (including validation from model)



It should be simple; although I'm having a hard time to figure out the best way to do it. I've MVC2 pages with multiple forms on the same page having different functionalities.

What's the best way to handle this; including the MVC2 way of validation from the model?


Sharepoint: In Calculated Column, Code with multiple "IF" condition does not work.

Implemantation:  Calculate expected resolve date exclude "Saturday" and "Sunday"  based on Priority and Severity.Columns are:1. Priority:2. Severity:3. Raised on: Date record createdCode: Below is the code which contains multiple "If" conditions. For quick undersatnding, i separated major If condition. Below code does not work and sharepoint gives me Sytax error message. =IF(OR(Priority="Critical",Severity="Critical"),IF(TEXT(WEEKDAY([Raised on]+1),"dddd")="Saturday",[Raised on]+3,[Raised on]+1),     IF(OR(Priority="HIGH",Severity="HIGH"), IF(TEXT(WEEKDAY([Raised on]+1),"dddd")="Saturday",[Raised on]+4, IF(TEXT(WEEKDAY([Raised on]+2),"dddd")="Saturday",[Raised on]+4,[Raised on]+2)) ,   IF(OR(Priority="MEDIUM",Severity="MEDIUM"), IF(TEXT(WEEKDAY([Raised on]+1),"dddd")="Saturday",[Raised on]+5, IF(TEXT(WEEKDAY([Raised on]+2),"dddd")="Saturday",[Raised on]+5, IF(TEXT(WEEKDAY([Raised on]+3),"dddd")="Saturday",[Raised on]+5,[Raised on]+3)) ) ,   IF(OR(Priority="LOW",Severity="LOW"), IF(TEXT(WEEKDAY([Raised on]+1),"dddd")="Saturday",[Raised on]+6, IF(TEXT(WEEKDAY([Raised on]+2),"dddd")="Saturday",[Raised on]+6, IF(TEXT

Receive/Delete Multiple FTP Files based on condition using SCRIPT(VB) TASK

I am trying to receive and delete multiple FTP files from a remote FTP server using Script task Below is the code   Dim FTPConnMgr As ConnectionManager FTPConnMgr = Dts.Connections("FTP Connection Manager") Dim FTPClientConn As FtpClientConnection = New FtpClientConnection(FTPConnMgr.AcquireConnection(Nothing)) Dim FileTimeStampNew As String = "20100913021807" Dim remoteFileNames(0) As String remoteFileNames(0) = Dts.Variables("FtpRemoteDirectory").Value & "*" & FileTimeStampNew & ".*" 'Below hardcoded FileName works good. But the problem is there are lots of file in the FTP folder that I dont want to receive 'remoteFileNames(0) = Dts.Variables("FtpRemoteDirectory").Value & "Company_alpha_Full_20100913021807.xml" Dim localPath As String = Dts.Variables("FtpLocalDirectory").Value FTPClientConn.Connect() FTPClientConn.ReceiveFiles(remoteFileNames, localPath, False, False) FTPClientConn.Close() Dts.TaskResult = ScriptResults.Success End Sub End Class If i specifically mention the RemotefileNames this works fine but, when I say *.* it executes succefully but doesn't receives the file. Please advice how to receive multiple file based on a variable BR, AWM

parameterize case condition

i have a case statement and i need to paramterize by the Y or No flag.   i have declared the variable as bit (tried int also) set @ ACT_FLG = 1   ,CASE WHEN GETDATE() BETWEEN rp.EFF_DT AND rp.END_DT + 1     THEN 1     ELSE 0 END AS ACTIVE   in the where clause ih have this... WHERE ACTIVE = @ACT_FLG   so i am getting this when I run the query Msg 207, Level 16, State 1, Line 68 Invalid column name 'ACTIVE'.

how to paramaterize a case condition

Im using a stored prcedeure for ssrs that has a case statement in it.  (attached) using a second data set , what would i put in for a select query to select (Y/N) in a dropdown but by default I w to show both   declare @cost_id int declare @RBT_TYP_ID int DECLARE @ACT_FLG int set @cost_id = 66 set @RBT_TYP_ID = (105) SET @ACT_FLG = 1 SELECT r.EM_ITEM_NUM ,r.DSCR ,item.SELL_DSCR ,splr.SPLR_NAM ,rp.AMT ,rp.EFF_DT ,rp.END_DT ,last_upd.DisplayName ,last_upd.MOD_DT ,t.ACTIVE FROM dbo.T_REBATE r INNER JOIN REFERENCE.dbo.T_IW_EM_ITEM item ON r.EM_ITEM_NUM = item.EM_ITEM_NUM INNER JOIN dbo.V_REBATE_LAST_UPDATED last_upd ON r.REBATE_ID = last_upd.REBATE_ID LEFT JOIN dbo.V_GNRC_SPLR splr ON item.SPLR_ACCT_ID = splr.SPLR_ACCT_NUM LEFT JOIN dbo.T_REBATE_PERIOD rp ON r.REBATE_ID = rp.REBATE_ID cross apply (select CASE WHEN GETDATE() BETWEEN rp.EFF_DT AND rp.END_DT + 1 THEN 1 ELSE 0 END AS ACTIVE)t WHERE R.RBT_TYP_ID = @RBT_TYP_ID AND t.ACTIVE = @ACT_FLG

How would you handle this? Multiple instance of a custom class...


Forgive me if this isn't the appropriate place.

I have the following data.

10484	1	30	0.5011	0.4630	0.5254	0.0081	10.8362
10484	1	30	0.5061	0.4666	0.5363	0.0075	12.2901
10484	1	30	0.5051	0.4688	0.5383	0.0060	12.5718
10484	1	30	0.5064	0.4623	0.5352	0.0074	12.9344
10484	2	30	0.5035	0.4637	0.5371	0.0074	13.1082
10484	2	30	0.5092	0.4726	0.5397	0.0075	11.7046
10484	2	30	0.5051	0.4645	0.5368	0.0060	13.1261
10484	2	30	0.5062	0.4642	0.5392	0.0081	13.2161

 I am using the following class.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace CvasAdmin.Classes
  public class invitro
    public class invitroDetail
      // pk of the foxpro Dbf
      public double sampleid;

How to handle multiple user


Helllo i am working on web application the problem i m facing is that if a user access saleorder form i goto database and get Max SID from saleorder table and increment in it, and when user finish i sent this id Saleorder table and other info as well as same SID to other 2 tables but the problem is that if multiple users access at samee time how can i manage SID there wil be id conflict as SID is PK in SaleOrder and FK in other two tables plz plz plz help me regarding this problem

How to check for space in a password regex having multiple condition

I have a requirment where in the password field should accept all keys except space, it should have atleast one number , length should be 6 to 50
I tried following but did not work
1) Regex = @"^.*(?=.{6,50})(?=.*\d)(?=.*[a-zA-Z]).*$"

2) ^(?=[^\s])(?=[^\s]{6,50})(?=[^\s]*\d)(?=[^\s]*[a-zA-Z]).*$

Following are my test input text ( test case no 2 is having space at end)

ShouldNOT 654321-4
Should NOT654321-5
S houldNOT654321-6
ShouldNOT65432 1-7
S houldNOT 654321-9

Please help.

Thanks in Advance.
Rajendra Dewani

Regards Rajendra Dewani

sql case statement with two condition



declare @year int,@month int


while (@month <=13 and @year<=year(getdate()))

SET @month=@month+1
SET @year=case @month when 13 then @year +1
ans @month =1 else @year end 
SET @year=@year+1


in this case statemtent i also want that when year increase means when increment of year happens then month variable shouls chage oe reset to 1 so that loop can start from 1 month of new year..

but i get error in this case statement when i use and @month =1

please help me and provide needful step

reading Multiple queries in If condition


I have search input on my web page txtSearch.text(Column name is JobNO ,this column present in all the 3 tables), when i submit a value click on search button it has to read 3 tables.is it appropriate writing 3 queries in if condition..something like follows but not sure of it

if  txtSearch.text<>"" then
Query=select * from ship
elseif txtSearch.text<>"" then
Query=select * from openorder
Query=select * from schedule
end if

when i give above input it should read 3 tables and write the value on grid view,i am held up here and thankful to you can any one provide the possible solution

Can't SSRS 2008 handle stored procedures which return multiple tables?


I tried it and it only returns the first table.

Any suggestion?

Thank you,


How do I handle multiple namespaces?



I have an XML document that has multiple namespaces. I cannot figure out how to successfully get data out of this thing. The following:

DECLARE @xml xml = '<?xml version="1.0"?>
<Messages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://tempuri.net/MyCompany.Comms.Commands" xmlns:baseType="MyCompany.Api.Command">
SELECT	@xml.query(

Multiple database support with Entity Framework

One of the features introduced in Entity Framework is being database independent. Which mean each database provider can support Entity Framework by implementing its provider.

This feature allows you build applications independent from the underplaying database provider. In this post I'm going to show how to build an application that support multiple databases using same conceptual model made by Entity Framework.

Visual Case Tool - UML Tutorial

The Class Diagram

The class diagram is core to object-oriented design. It describes the types of objects in the system and the static relationships between them.

Binding the multiple drop down boxes in GridView using JQuery in ASP.NET

Here is the code for binding the multiple drop down boxes in GridView using JQuery in ASP.NET

Upload Multiple File using JQuery in asp.net

In this article I have explained how to upload multiple files using file upload control. I have used jQuery plugin for uploading multiple files.

I have also explained how to check for file type, file maximum size limit using jQuery & also using server side validation code.
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

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