|
|
Hi there,
How can i search a text file to see if it contain an image, and desplay the image
Thanx
|
|
|
|
|
As a file is just a collection of data, and an image is just a collection of data how would you know if any data is an image? Bob
Ashfield Consultants Ltd
|
|
|
|
|
i have a text file,n in it I used the to load the image from the folder, because i use 1 web page to load the part of the texfiles, using parameters.
on the same web page i have a link which display the full text file in another web page, in which i dnt want the picture to display only the text.
|
|
|
|
|
You can Search for "<img" tag using regular expression:
<img[^<>]+>
|
|
|
|
|
Well thats rather different from what you first asked about. In this case, you can use a regular expression to find the img tag, or split the string in various ways. Bob
Ashfield Consultants Ltd
|
|
|
|
|
how do i do it, i hv the idea but dnt knw hw to put it in code
Thanx
|
|
|
|
|
Well, have you used the tried and trusted method of MSDN or Google? I am not in the business of writing free code, I have told you the method(s) you can use, its up to you to make an effort and research them. Both regular expressions and string manipulation are pretty basic subjects, if you want to be a developer you need to learn to think for yourself.
If you have a specific problem, post the code and error message and someone will help you.
Also, please use all the keys, don't write in text speak, its just plain stupid.Bob
Ashfield Consultants Ltd
|
|
|
|
|
If u dnt want to help dnt respond there r so many ppl willing to help, keep ur knowledge really, i mean why bother.
Thanx anyway(for nothing)
|
|
|
|
|
I assumed that by telling you which methods to use I was helping. If this is your attitude then I will not bother helping any further, you ungrateful b*gger.
My point about text speak is simple really. Many people who use Code Project do not have English as their first language, and its often hard enough to figure out what they mean when they use full words without havng to try and guess what word they meant from 2 or 3 letters.Bob
Ashfield Consultants Ltd
|
|
|
|
|
Hi,
I am receiving following error:
Retrieving the COM class factory for component with CLSID {000209FF-0000-0000-C000-000000000046} failed due to the following error: 80040154.
I receive this on hosting server. Itried to read doc files using Microsoft.Office.interop.word.dll; can anyone help me?Yours,
KaNNaN
-----------------------------------------------------------------
"Success is When Ur Signature Becomes An Autograph"
|
|
|
|
|
Is your server have Word installed ?
Also the ClassID changes with Version.
|
|
|
|
|
ya office 2000 installed.... Yours,
KaNNaN
-----------------------------------------------------------------
"Success is When Ur Signature Becomes An Autograph"
|
|
|
|
|
Then it must be a permission issue.
Check ASP.NET has permission to the folder.
|
|
|
|
|
Im New n Asp.Net
please tell me how to add permission??Yours,
KaNNaN
-----------------------------------------------------------------
"Success is When Ur Signature Becomes An Autograph"
|
|
|
|
|
Permission is nothing to deal with ASP.NET.
Just right click on the folder, and give permission to the ASP.NET user which loads the dll from classid.
|
|
|
|
|
Hello
We have a listbox with all name of database table. And I have a textbox above the listbox. We want whenever user enter any character in textbox then listbox should be filter with that specific character or word. But it should be done on client side only means I want a javascript code on asp.net with c# controls.
Please help me
Thanks inadvancelaxmi
|
|
|
|
|
Have a look to the link.It'll help you. Cheers!!
Brij
|
|
|
|
|
Hi Brij,
Thank you for your help. but i need to take data from database and it will fill to listbox based on textbox value
please kindly help me
thank youlaxmi
|
|
|
|
|
Hi,
For this you have to write a javacsript function that takes a parameter and loop through the list box and select the list box item when the search is matched.
Now you can call this javascript function onKeyPress or onKeydown of textbox above the listbox with parameter as the text of textbox above the listsbox, this way an incremental search can be implemented to select listbox items and based on each character entered in the text box.
Let me know if you need any further information on the same (javascript code etc.).
Thanx,
Adil... )
|
|
|
|
|
Hi,
Thank you for your help. but i need to fill listbox data from database and please give code for this javascript.
thankslaxmi
|
|
|
|
|
Hi Laxmi,
On the code hehind, when your page loads add attributes for javascript key events(suppose your text box is TextBox1 and list box is lstTest) code is :
TextBox1.Attributes.Add("onKeyUp","javacsript:searchOptions('lstTest',document.getElementById('TextBox1').value);");
TextBox1.Attributes.Add("onLostFocus","javacsript:searchOptions('lstTest',document.getElementById('TextBox1').value);");
Now on the aspx page following function can be implemented:
function searchOptions(selectboxID, searchText){
var selectbox = document.getElementById(selectboxID);
var i;
searchTextLength = searchText.length;
for(i=0;i<selectbox.options.length-1;i++){
if(selectbox.options[i].text.indexOf(searchText)>=0){
selectbox.options[i].selected = true;
break;
}
}
}
Hope this helps, I test this in IE7.0 with list box filled with database values only.
Let me know if you need any further information on the same.
Thanx,
Adil... )
|
|
|
|
|
Hi,
Please give me sample code for this,
Please help me
thanks in advance.laxmi
|
|
|
|
|
Hi
Please see the sample code in my last reply I posted today morning itself, I tested it is working perfectly.
Thanx,
Adil... )
|
|
|
|
|
Hi Laxmi,
Please find the updated code of incremental search to display result in a div tag.
JavaScript function :
---------------------
function searchOptions(selectboxID, searchText){
var selectbox = document.getElementById(selectboxID);
var i;
var divResult = document.getElementById('divResult');
var searchResult = '';
var opt;
for(i=0;i<selectbox.options.length-1;i++){
if (selectbox.options[i].text.indexOf(searchText) >= 0) {
searchResult = searchResult + selectbox.options[i].text + "<br>";
}
}
divResult.innerHTML = '';
divResult.innerHTML = searchResult;
}
HTML Code :
-----------
<asp:TextBox ID="TextBox1" runat="server" ></asp:TextBox>
<asp:ListBox ID="lstTest" runat="server" >
<asp:TextBox ID="TextBox1" runat="server" ></asp:TextBox>
<asp:ListBox ID="lstTest" runat="server" >
<asp:ListItem Text="Adil"></asp:ListItem>
<asp:ListItem Text="ab"></asp:ListItem>
<asp:ListItem Text="abc"></asp:ListItem>
<asp:ListItem Text="abcd"></asp:ListItem>
<asp:ListItem Text="abcde"></asp:ListItem>
<asp:ListItem Text="abcdef"></asp:ListItem>
<asp:ListItem Text="abcdefg"></asp:ListItem>
</asp:ListBox>
<div id="divResult"></div>
Hope Now you get the the solution.
Pls let me know if you need any further information on the same.
Thanx,
Adil... )
|
|
|
|