|
i'm using sqldatasource in order to search a table item with the column name.
I want to search Name column for any word containing any letter found in the text box control.
I tried to write the following:
SELECT Name, Email FROM Item WHERE CONTAINS (Name , @Name)
The following error appears:
Cannot use a CONTAINS or FREETEXT predicate on table or indexed view 'Item' because it is not full-text indexed.
could you please help me.
thanks
|
|
|
|
|
You need to use LIKE
SELECT @Name = '%' + @Name + '%'
SELECT Name, Email FROM Item WHERE Name like @Name
Bob
Ashfield Consultants Ltd
|
|
|
|
|
It is working,
Thanks for help Bob
Regards,
|
|
|
|
|
Are you using OLEDB or SQL, there are Some SQL Functions that are not Available in OLEDB like you cant substring in OLEDB instead you MID.
SELECT Name, Email FROM Item
WHERE Name like '%@Name%'
Hope this Helps
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
Hi,
I want to create a gridview in which it contains 2 cells which contains one textbox and one dropdown.
and a addbutton
when i click on this add button
1 more blank row must be added, but previous rows data should not get deleted.
how can i achieve this.
“You will never be a leader unless you first learn to follow and be led.”
–Tiorio
"Coming together is a beginning, staying together is progress, and working together is success." Henry Ford
|
|
|
|
|
Hi...Mogambo...
i have Implement With below Condition...
I have Put Add Button out side of datagrid.....
when u click on that button on click event u can write this code....it will insert new row in datagrid
DataTable ABC= objDAO.ExecuteSelectDataTable(StoredProcedure);
if (dtAccommodationType != null)
{
DataRow dr = ABC.NewRow();
ABC.Rows.InsertAt(dr, 0);
Datagrid.EditItemIndex = 0;
Datagrid.DataSource = dtAccommodationType;
Datagrid.DataBind();
Datagrid.Items[0].Focus();
}
Cheers,
Hemant Patel
|
|
|
|
|
hi,
Iam currently working with the login control when i executed my application then the following errors are rising.
Error 1 Name cannot begin with the '<' character, hexadecimal value 0x3C. Line 14, position 5. F:\ExampleLogin\Web.Config 14
Error 2 F:\ExampleLogin\Default.aspx: ASP.NET runtime error: Name cannot begin with the '<' character, hexadecimal value 0x3C. Line 14, position 5. (F:\ExampleLogin\web.config line 14) F:\ExampleLogin\Default.aspx 1 1 F:\ExampleLogin\
Error 3 Expecting '>'. F:\ExampleLogin\Web.Config 14 5 F:\ExampleLogin\
|
|
|
|
|
I rather think the error message says it all. Name cannot start with <<br mode="hold" />
I expect the last error is because it was expecting a closing >
Bob
Ashfield Consultants Ltd
|
|
|
|
|
iam having a grid view where each row is having one checkbox and one textbox now how can i get the validate the grid view tat when a checkbox is checked the corrsponing row text box is empty or not in a button clicked.
|
|
|
|
|
There r 2 way to implement this one...
While Gridview Rowdatabound event you can implement this task.....
when u clcik on edit at that time u can add saveButton.attributes.add();
In add mathod pass Eventname and javascript function with retrun argument....in javascript function only u can pass checkbox,and textbox client id...so u can access that control in javascript....
Cheers,
Hemant Patel
|
|
|
|
|
hi lakshmichawala,
i am sending a code that will collect all checked row of a gridview
here gvApartment is a grid view and d set its Datakey value to Id
and call this method
///
/// Method for collect Ids of checked rows
///
/// <returns>
public string gridrow()
{
string rowid = "";
for (int i = 0; i < gvApartment.Rows.Count; i++)
{
GridViewRow row = this.gvApartment.Rows[i];
CheckBox chkSelect = (CheckBox)row.FindControl("chkSelect");
if (chkSelect.Checked == true)
rowid += this.gvApartment.DataKeys[row.RowIndex].Value + ",";
}
if (rowid.Length > 0)
{
rowid = rowid.Substring(0, rowid.LastIndexOf(",")).ToString();
return rowid;
}
else
{
return "";
}
}
|
|
|
|
|
Hi,
As i am developing a application for login form. Whenever any user logged in then the user name shuld be displayed like in Yahoo. For example once a user logged with user id and password in Yahoo then while opening the page the user name will be displayed as Welcome user.
so can anyone help me. How to do such a application.
Thanks in advance.
|
|
|
|
|
ASP.NET has its own login control which is very suitable for your situation:
Login Control
|
|
|
|
|
user.identity.name
Regards...
- Amit Kushwaha
|
|
|
|
|
U can store username in session and where u want to display u can display that one...
|
|
|
|
|
hi,
I m trying to implement url rewriting using this example
http://www.codeproject.com/KB/aspnet/urlrewriter.aspx[^]
But I m getting error in web.config
Unrecognized configuration section rewriter.
Can anyone help me out why is this error shown.
When I m trying to run original code its working fine.
Regards
Vijay V.
Yash Softech
|
|
|
|
|
Have you checked through the comments by people at the bottom.
Also try e-mailing the person.
|
|
|
|
|
Ya but that doesn't work
Please give me some other solution
Vijay V.
Yash Softech
|
|
|
|
|
hai,
currently i m using asp.net with c# 2005 (framework 2.0)
I like to include the "LOADING" or "PROGRESS BAR" in my project when the page in process or while i m uploading the data into database etc etc...
many suggest me to do using THREADING concept which is more efficient. but i m NULL in THREADING concept. can anyone suggest me a good link for threading concepts and also the "LOADING" process using threading?????
Thanks in advace - KARAN
|
|
|
|
|
Karan_TN wrote: but i m NULL in THREADING concept.
Check this out:
Loading Bar
|
|
|
|
|
Hy,
i need to write a code in java script such that when i click on date in the calender(i.e select date of birth).then i should get the current age (dd/mon/yyyy format)by subtracting it with the current age.
|
|
|
|
|
Thats nice.
Have you not written any code yourself?
|
|
|
|
|
hai.
currently i m using asp.net with c# (framework 2.0)
i have created a style sheet and included in my project. i applied for the textbox,buttons,labels etc...
i prompt a message box when user clicks one button... (like
Response.Write("<script>alert('Fill all the mandatory fields to proceed!');</script>"); )
The problem is when user press the button the message box prompts and the stylesheet properties disappear... how to solve it.
Help me plz... - KARAN
|
|
|
|
|
can we decrypt MD5 algorithm key to original text.Please help me
Piyush Vardhan Singh
p_vardhan14@rediffmail.com
http://holyschoolofvaranasi.blogspot.com
http://holytravelsofvaranasi.blogspot.com
|
|
|
|
|
ANSWER:=
private void button1_Click(object sender, EventArgs e)
{
string sd = EncryptMd5("Piyush Vardhan Singh Rajkumar", "sdf");
MessageBox.Show(sd);
string dd = DecryptMd5(sd, "sdf");
MessageBox.Show(dd);
}
public static string DecryptMd5(string sToOriginal, string sPassKey)
{
try
{
byte[] sPassKeyArray;
byte[] sOriginalArray = Convert.FromBase64String(sToOriginal);
MD5CryptoServiceProvider MD5Hash = new MD5CryptoServiceProvider();
sPassKeyArray = MD5Hash.ComputeHash(UTF8Encoding.UTF8.GetBytes(sPassKey));
MD5Hash.Clear();
TripleDESCryptoServiceProvider tripleDesCsp = new TripleDESCryptoServiceProvider();
tripleDesCsp.Key = sPassKeyArray;
tripleDesCsp.Mode = CipherMode.ECB;
tripleDesCsp.Padding = PaddingMode.PKCS7;
ICryptoTransform cTransform = tripleDesCsp.CreateDecryptor();
byte[] resultArray = cTransform.TransformFinalBlock(sOriginalArray, 0, sOriginalArray.Length);
tripleDesCsp.Clear();
return UTF8Encoding.UTF8.GetString(resultArray);
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString());
return null;
}
}
public static string EncryptMd5(string sOriginal, string sPassKey)
{
byte[] sPassKeyArray;
byte[] sOriginalArray = UTF8Encoding.UTF8.GetBytes(sOriginal);
MD5CryptoServiceProvider MD5Hash = new MD5CryptoServiceProvider();
sPassKeyArray = MD5Hash.ComputeHash(UTF8Encoding.UTF8.GetBytes(sPassKey));
MD5Hash.Clear();
TripleDESCryptoServiceProvider tripleDesCsp = new TripleDESCryptoServiceProvider();
tripleDesCsp.Key = sPassKeyArray;
tripleDesCsp.Mode = CipherMode.ECB;
tripleDesCsp.Padding = PaddingMode.PKCS7;
ICryptoTransform cTransform = tripleDesCsp.CreateEncryptor();
byte[] resultArray = cTransform.TransformFinalBlock(sOriginalArray, 0, sOriginalArray.Length);
tripleDesCsp.Clear();
return Convert.ToBase64String(resultArray, 0, resultArray.Length);
}
Piyush Vardhan Singh
p_vardhan14@rediffmail.com
http://holyschoolofvaranasi.blogspot.com
http://holytravelsofvaranasi.blogspot.com
|
|
|
|