|
iam having three user controls in say uc1,uc2,uc3.iam using this uc1 in ,uc2 and uc3 .where in uc1 iam having a gridview.now iam taking these controls in another web page.the problem is the grid is recognised in the uc2.but it is not recognising in the uc3 .it is genarting a script error .object is required, how this problem is solved.
|
|
|
|
|
So youve got a gridview which can be shown in two pages but not the ohter?
Im a bit confused as to what you are trying to do, please reword your question.
|
|
|
|
|
hi all
i dont know where to put this question but i think it would be here
i have the following SPQuery which it get its result from custom list inside sharepoint site
SPList splTerrorism = spsw.Lists[NaussLists.AttackedEntityName];
SPQuery spqTerrorismQuery = new SPQuery();
spqTerrorismQuery.Query = @"<Query><Where><And><And><And><And><And>";
spqTerrorismQuery.Query += "<And><And><And><And><Geq><FieldRef Name='DateOfAction' />";
spqTerrorismQuery.Query += "<Value Type='DateTime'>" + txtFrom.Text + "</Value>";
spqTerrorismQuery.Query += "</Geq><Leq><FieldRef Name='DateOfAction' />";
spqTerrorismQuery.Query += "<Value Type='DateTime'>" + txtTo.Text + "</Value></Leq></And>";
spqTerrorismQuery.Query += "<Contains><FieldRef Name='Country' /><Value Type='Lookup'>" + AllCountries + "</Value>";
spqTerrorismQuery.Query += "</Contains></And><Eq><FieldRef Name='City' /><Value Type='Lookup'>" + ddlCity.SelectedItem + "</Value>";
spqTerrorismQuery.Query += "</Eq></And><Contains><FieldRef Name='OperationName' /><Value Type='Text'>" + txtActionName.Text + "</Value>";
spqTerrorismQuery.Query += "</Contains></And><Contains><FieldRef Name='AttackingEntityName' />";
spqTerrorismQuery.Query += "<Value Type='Lookup'>" + AllAttackers + "</Value></Contains></And><Contains><FieldRef Name='AttackedEntityType' />";
spqTerrorismQuery.Query += "<Value Type='Lookup'>" + AllAttacked + "</Value></Contains></And><Contains><FieldRef Name='AttackedEntityName' />";
spqTerrorismQuery.Query += "<Value Type='Text'>" + ddlAttackedEntityName.SelectedItem + "</Value></Contains></And><Eq><FieldRef Name='WeaponType' /><Value Type='Lookup'>" + ddlWeaponType.SelectedItem + "</Value>";
spqTerrorismQuery.Query += "</Eq></And><Contains><FieldRef Name='ActionType' /><Value Type='Lookup'>" + AllActions + "</Value></Contains></And></Where></Query>";
SPListItemCollection splic = splTerrorism.GetItems(spqTerrorismQuery);
the problem is that all the list is displayed no matter what the value are even if there is no values at all
note : i made this CAML Query with U2U CAML Query Builder
Thank you
|
|
|
|
|
Hi my code not at all considering the if condition:
Plz whats wrong in that code tell me...,
foreach (DataRow drc in DS.Tables[DS.Tables.Count - 1].Rows)
{
int k = 0;
while (k < drc.Table.Rows.Count)
{
if (drc.Table.Rows[k][1].ToString() == Path.GetFileNameWithoutExtension(d.Name))
{
if (mbody.Length > 0)
{
mbody += ", ";
}
mbody += drc.Table.Rows[k][1].ToString();
}
k++;
}
}
Thanks & Regards,
NeW OnE,
please don't forget to vote on the post
modified on Monday, July 28, 2008 6:32 AM
|
|
|
|
|
this
if (drc.Table.Rows[k][1].ToString() == Path.GetFileNameWithoutExtension(d.Name)) is always false?
Or if (mbody.Length > 0) return always 0 (zero) length ?
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
|
|
|
|
|
hi sir
plz tell us why it will give false and 0 lenth always?
thanks....
gaurav
|
|
|
|
|
Because maybe he didn't debug his code.
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
|
|
|
|
|
New one wrote: DS.Tables[DS.Tables.Count - 1].Rows
If there is only one Table in the DS always, Why cant you use a DataTable.
New one wrote: drc.Table.Rows[k][1].ToString()
Set a break point a check what value is there in the above code.
|
|
|
|
|
Hopefully an easy one guys
Need to put % signs around an sql parameter in a stored procedure
something like %@value%
anyone have any ideaS?
thanks
|
|
|
|
|
this works for me in SQL 2000
CREATE PROCEDURE SpName AS<br />
<br />
declare @paramVal as varchar(4000)<br />
set @paramVal='value'<br />
select * from TableName where columnName like '%'+@paramVal+'%'<br />
GO
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
|
|
|
|
|
Thanks that worked!
|
|
|
|
|
You are welcome dude
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
|
|
|
|
|
Hi all!
I've been using the OnClientClick with the Button control for awhile now to execute JavaScript without causing page validation:
Button1.OnClientClick += "javascript:doThis(); return false;";
but one thing still eludes me...
Is it possible to execute the OnClientClick event on a textBox?
If anyone can figure out any solution, I would be highly grateful!
-= Reelix =-
|
|
|
|
|
try
TextBox1.Attributes.Add("OnClick", "javascript:alert('This is just sample');");
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
|
|
|
|
|
Thanks!
Works perfectly!
-= Reelix =-
|
|
|
|
|
You are welcome.
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
|
|
|
|
|
Hi,
i am inserting records from a datatable to sql server 2005 database using sqlbulk copy.
The problem is that the datasource datatype is different from sql server table datatype.
Is there any way to convert the datatype to there corresponding datatypes in the table.
thanks
|
|
|
|
|
no one has the answer???????????
Vijay V.
|
|
|
|
|
Usually I import into a staging table where every column is a varchar, then validate the contents to the real data type before moving them to the actual destination table. This gives you a chance to perform other validation too.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
HI,
is there any way to detect that what kind of value is there in an .csv file rows??
thanks
Vijay V.
Yash Softech
|
|
|
|
|
Not until its in a table. You should be able to do some basic checks as you know the final destination table.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
Hi Bob,
thanks for reply.
I was googling and found that I can use Namespace System.Microsft.SqlServer.SMO that has a class datatype using which I can set the datatype depending on my requirement but this I m not able to import this class in my project.
Do u have any idea regarding this
here is the code
public DataType GetDataType(string dataType)
{
DataType DTTemp = null;
switch (dataType)
{
case ("System.Decimal"):
DTTemp = DataType.Decimal(2, 18);
break;
case ("System.String"):
DTTemp = DataType.VarChar(50);
break;
case ("System.Int32"):
DTTemp = DataType.Int;
break;
}
return DTTemp;
}
Thanks
Vijay V.
Yash Softech
|
|
|
|
|
You can do it from there, or this sql works too
select column_name,data_type
from information_schema.columns
where table_name = '<yourtable>'</yourtable>
|For details on using the smo method see my CP article [^]
Bob
Ashfield Consultants Ltd
|
|
|
|
|
Hi Bob,
thanks for the help.
Vijay V.
Yash Softech
|
|
|
|
|
No problem
Bob
Ashfield Consultants Ltd
|
|
|
|