Showing posts with label pages. Show all posts
Showing posts with label pages. Show all posts

Wednesday, March 28, 2012

Text boxes in web pages

Am I the only person in the world or are there others that experience this problem.

When programming a web page, I create a table with text boxes in it. The background color of the boxes change to a yellow colr when the app is run.

I have even tried resetting the color in code but it still changes to yellow.

This has happened in several versions of VB .net that I have used.

Any solutions would be greatly appretiated as I have tried all that I know.

PeterGThread Moved
It's not ASP.NET - it's the Google toolbar, or any other autocomplete toolbar, you have installed.
Yes, that is true. I just learned of this in another thread a few hours ago thanks to timeshifter.

Uninstall the google toolbar.

Saturday, March 24, 2012

text search in asp.net

its urgent i want a text search in asp.net with c#

if i enter asp in text box and submit the page it has to get the pages with text syed in that page.

Help will be appriciated

Hi,

I haven't tried this yet but it migh help you:

http://www.dotnetjunkies.com/Tutorial/195E323C-78F3-4884-A5AA-3A1081AC3B35.dcik


i want text search utility for the whole of my website

Hi, Sorry but iam unable to understand this question, you entered a text asp now want pages with syed in that page(which page you want), and with what text. that text should be in the name or inside the content of the page.


1)enter the word which you want to search in your website.

2)diplay the pages where this word occurs in your website pages.


Hi, i do not know if their is some inbuilt facility to do so.What i could have done, is this way,

The project where your webpages are present is a directory . So first find the no. and names of file in that directory and put the name inside a string array.

Now we have the names of all files we have to read.

Create a foreach loop and start reading the file .This will be outermost loop . In the inner loop start reading them and match the each string with your own string .If matches skip the inner loop then save the name of that file inside another string array.Its like we do linear Search,

In the end use javascript code to open your webpage with the names retrieved from the string Array in your code behind.

--------

Its true that giving suggestions is quite easy, but some times they help.

Hope this will help


Thanks BMW,

But i got this url fewdays back and its working .

but anyhow thanks for sending me the url.


syedwna:

1)enter the word which you want to search in your website.

2)diplay the pages where this word occurs in your website pages.

Hi,

Here is a demo for you :http://www.codeproject.com/aspnet/SearchDotnet.asp

Hope this helps.


hiJerome Cui - MSFT ,

i used the application what u gave the url,it was working fine on local host

now when i put the application on live server , i got the error

The remote server returned an error: (500) Internal Server Error.

Description:An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details:System.Net.WebException: The remote server returned an error: (500) Internal Server Error.

[WebException: The remote server returned an error: (500) Internal Server Error.]
System.Net.WebClient.DownloadDataInternal(Uri address, WebRequest& request) +338
System.Net.WebClient.DownloadData(Uri address) +181
System.Net.WebClient.DownloadData(String address) +26

What could be the problem.

text searching a dynamic ASP.NET site?

I want to implement a text search on my website that will look through all
the pages and be able to search them for text someone says, kinda like
google does with the internet, but internally only on the intranet site...
how would i go about doing something like this in ASP.NET?Mmm... I think in this article you will find valuable info:

http://www.codeproject.com/aspnet/Spideroo.asp

Regards
Braulio
--
/// ----------
/// Braulio D*ez Colaborador DNM
///
/// http://www.dotnetmania.com
/// My Site (.net Tips): http://www.bdiez.com
/// ----------

"Brian Henry" wrote:

> I want to implement a text search on my website that will look through all
> the pages and be able to search them for text someone says, kinda like
> google does with the internet, but internally only on the intranet site...
> how would i go about doing something like this in ASP.NET?
>
You'll need MS's Indexing Service
This is a good link: http://idunno.org/dotNet/indexserver.aspx
I have used dtSearch and its pretty sleek (little expensive though)

text searching a dynamic ASP.NET site?

I want to implement a text search on my website that will look through all
the pages and be able to search them for text someone says, kinda like
google does with the internet, but internally only on the intranet site...
how would i go about doing something like this in ASP.NET?Mmm... I think in this article you will find valuable info:
http://www.codeproject.com/aspnet/Spideroo.asp
Regards
Braulio
--
/// --
/// Braulio D_ez Colaborador DNM
///
/// http://www.dotnetmania.com
/// My Site (.net Tips): http://www.bdiez.com
/// --
"Brian Henry" wrote:

> I want to implement a text search on my website that will look through all
> the pages and be able to search them for text someone says, kinda like
> google does with the internet, but internally only on the intranet site...
> how would i go about doing something like this in ASP.NET?
>
>
I have used dtSearch and its pretty sl (little expensive though)

text selection problem

hi

I have a page full of panels!!! and I have a problem to select text in my pages. when I try to select a part of text, the whole text will select. what should I do with this problem. I have found some other websites that have exactly this problem, for examplehttp://www.elkjop.no/

Select as in select the text with the mouse on the page that is displayed in the browser? If not, can you please give a bit more detail?
yes. when a user want to select the text with his mouse, then the whole page text will select. no matter he drag the mouse on one word or one sentence or...

It has nothing to do with your code. The problem is either with how the browser you're using handles text selection or how you actually try to select the text.

By the way, I have no trouble selecting only the text I want from the website you mentioned.


Hiashk1860,

When I select text on the website you gave, there is no problem as you said.

It may be your browser's problem or other things.

HTH


yes

I used IE 6 and have selection problem but not with firefox and opera. but why??


But I check it out using IE7 and there is no problem. So it's not web site problem, it's your browser's problem.

Text Size

I found an issue while working on my asp.net pages in VB. When you open the browser everything looks fine. If a user clicks view and text size and changes the size to larger all my pages are distorted. The text boxes are merged and you cant read them. Does anyone have a solution for this?How are you creating your web page? The pages should look different, but shoudl still be readable. Can you send a short aspx page that demonstrates the behaviour?

Thanks,

Russell
Sounds like you are using GridLayout as you pageLayout (but I could be wrong). I would suggest putting your information (labels and textboxes) in a table. If this dosen't work let me know and I will take a closer look.

Trey
yes I am using a grid layout
I tried to see if there was a difference with a html label or a web form label but they look the same. It seems when the text size is increased by the user it drops the second word in the textbox on another line. How do you know when to use a html label or a web form label?
here a sample

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>trash</title>
<meta content="Visual Basic 7.0" name="CODE_LANGUAGE">
<meta content="JavaScript" name="vs_defaultClientScript">
<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
</HEAD>
<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server">
<TABLE id="Table1" style="Z-INDEX: 103; LEFT: 200px; WIDTH: 128px; POSITION: absolute; TOP: 32px; HEIGHT: 30px" cellSpacing="1" cellPadding="1" width="128" border="1">
<TR>
<TD><asp:label id="Label1" runat="server" Width="95px" Height="22px">web form label</asp:label></TD>
</TR>
</TABLE>
<DIV style="DISPLAY: inline; Z-INDEX: 102; LEFT: 338px; WIDTH: 69px; POSITION: absolute; TOP: 34px; HEIGHT: 25px" ms_positioning="FlowLayout">html
label</DIV>
</form>
</body>
</HTML>
For you table width i would use percents instead of px. I feel it is the best way if you are worried about font size increases. I would also use flowlayout for what you are trying to do. here is an example:


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>trash</title>
<meta content="Visual Basic 7.0" name="CODE_LANGUAGE">
<meta content="JavaScript" name="vs_defaultClientScript">
<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
</HEAD>
<body>
<form id="Form1" method="post" runat="server">
<TABLE id="Table1" cellSpacing="1" cellPadding="1" width="50%" align="center" border="1">
<TR>
<TD>
<asp:Label id="Label1" runat="server">Label</asp:Label></TD>
<TD>
<asp:TextBox id="TextBox1" runat="server"></asp:TextBox></TD>
</TR>
</TABLE>
</form>
</body>
</HTML>

if you give me exactly what you are doing i can see if i can get it working for you.
It looks like that will do the trick thanks a lot.

Tuesday, March 13, 2012

TextBox and Button

Hey guys...
In my aspx page I have a textbox that when the user press Return I need to
click a button. How can I do it?
OR
All the pages that contains buttons have a default button, but I don't know
how to define the default button. If I do it, my problem will be solved.
Thank'shttp://www.dotnetspider.com/Technol...px?SampleId=212
"Andr Almeida Maldonado" <deweb@.bol.com.br> wrote in message
news:u9d7HtyUEHA.2692@.TK2MSFTNGP09.phx.gbl...
> Hey guys...
> In my aspx page I have a textbox that when the user press Return I need to
> click a button. How can I do it?
> OR
> All the pages that contains buttons have a default button, but I don't
> know
> how to define the default button. If I do it, my problem will be solved.
>
> Thank's
>
Hy Ken
I make this:
<asp:textbox id="txtEntrPrCB" onKeyDown="KeyDownHandler('btnEntrPrMa')"
.....
But when I press Enter, I receive this error:
Object doesn't suport this property or method.
WHY'? What I'm doing wrong?
Thank's
"Ken Cox [Microsoft MVP]" <BANSPAMken_cox@.sympatico.ca> escreveu na mens
agem
news:OFjqo8yUEHA.2668@.TK2MSFTNGP10.phx.gbl...
> http://www.dotnetspider.com/Technol...px?SampleId=212
> "Andr Almeida Maldonado" <deweb@.bol.com.br> wrote in message
> news:u9d7HtyUEHA.2692@.TK2MSFTNGP09.phx.gbl...
to
>
There may be some errant spaces in the code.
How about this?
Ken
<!-->
<%@. Page Language="VB" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
<script language="javascript">
function KeyDownHandler(btn)
{
// process only the Enter key
if (event.keyCode == 13)
{
// cancel the default submit
event.returnValue=false;
event.cancel = true;
// submit the form by programmatically clicking the specified
button
alert('Clicked');
btn.click();
}
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Button Runat="server" ID="DefButton" />
<asp:TextBox Runat="server" ID="FirstName"
onKeyDown="KeyDownHandler(DefButton)" />
</div>
</form>
</body>
</html>
<!-->
"Andr Almeida Maldonado" <deweb@.bol.com.br> wrote in message
news:OWahAJzUEHA.2716@.tk2msftngp13.phx.gbl...
> Hy Ken
> I make this:
> <asp:textbox id="txtEntrPrCB" onKeyDown="KeyDownHandler('btnEntrPrMa')"
> .....
> But when I press Enter, I receive this error:
> Object doesn't suport this property or method.
>
> WHY'? What I'm doing wrong?
>
> Thank's
>
> "Ken Cox [Microsoft MVP]" <BANSPAMken_cox@.sympatico.ca> escreveu na
> mensagem
> news:OFjqo8yUEHA.2668@.TK2MSFTNGP10.phx.gbl...
> to
>
Andre,
The code Ken gave you will work, but event.KeyCode will only work for IE and
not netscape. If you want to, I have a bunch of useful javascripts all
rolled into a single component on my website, www.aboutfortunate.com. Click
the code library link on the top right of the page and then click the
javascript button in the menu on the left.
All code on my site is free and the full .NET v1.1 project is downloadable.
So even if you don't want to use the object as is you can get some decent
code examples from it.
Sincerely,
S. Justin Gengo, MCP
Web Developer / Programmer
www.aboutfortunate.com
"Out of chaos comes order."
Nietzsche
"Andr Almeida Maldonado" <deweb@.bol.com.br> wrote in message
news:OWahAJzUEHA.2716@.tk2msftngp13.phx.gbl...
> Hy Ken
> I make this:
> <asp:textbox id="txtEntrPrCB" onKeyDown="KeyDownHandler('btnEntrPrMa')"
> .....
> But when I press Enter, I receive this error:
> Object doesn't suport this property or method.
>
> WHY'? What I'm doing wrong?
>
> Thank's
>
> "Ken Cox [Microsoft MVP]" <BANSPAMken_cox@.sympatico.ca> escreveu na
mensagem
> news:OFjqo8yUEHA.2668@.TK2MSFTNGP10.phx.gbl...
need
> to
solved.
>
hy
here is some code snippet:
--
put next code in Page_Load
TextBox1.Attributes.Add("onkeypress",
"if(event.keyCode==65)Form1.Button1.onclick();")
when you press 'A' in TextBox,preseding code excute
You can intercept the client side enter keypress event of the text box and
then do what you want using javascript code.
Here's a good example:
http://www.kamp-hansen.dk/pages/sho...id=21&menuid=18
You could also try using this free control.
http://www.metabuilders.com/tools/DefaultButtons.aspx
And here's a couple good articles on the subject:
http://www.allasp.net/enterkey.aspx
http://www.aspnetpro.com/features/2...p200406so_f.asp
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
"Andr Almeida Maldonado" <deweb@.bol.com.br> wrote in message
news:u9d7HtyUEHA.2692@.TK2MSFTNGP09.phx.gbl...
> Hey guys...
> In my aspx page I have a textbox that when the user press Return I need to
> click a button. How can I do it?
> OR
> All the pages that contains buttons have a default button, but I don't
know
> how to define the default button. If I do it, my problem will be solved.
>
> Thank's
>

TextBox and Button

Hey guys...

In my aspx page I have a textbox that when the user press Return I need to
click a button. How can I do it?

OR

All the pages that contains buttons have a default button, but I don't know
how to define the default button. If I do it, my problem will be solved.

Thank'shttp://www.dotnetspider.com/Technol...px?SampleId=212

"Andr Almeida Maldonado" <deweb@.bol.com.br> wrote in message
news:u9d7HtyUEHA.2692@.TK2MSFTNGP09.phx.gbl...
> Hey guys...
> In my aspx page I have a textbox that when the user press Return I need to
> click a button. How can I do it?
> OR
> All the pages that contains buttons have a default button, but I don't
> know
> how to define the default button. If I do it, my problem will be solved.
>
> Thank's
Hy Ken

I make this:

<asp:textbox id="txtEntrPrCB" onKeyDown="KeyDownHandler('btnEntrPrMa')"
......

But when I press Enter, I receive this error:

Object doesn't suport this property or method.

WHY??? What I'm doing wrong?

Thank's

"Ken Cox [Microsoft MVP]" <BANSPAMken_cox@.sympatico.ca> escreveu na mensagem
news:OFjqo8yUEHA.2668@.TK2MSFTNGP10.phx.gbl...
> http://www.dotnetspider.com/Technol...px?SampleId=212
> "Andr Almeida Maldonado" <deweb@.bol.com.br> wrote in message
> news:u9d7HtyUEHA.2692@.TK2MSFTNGP09.phx.gbl...
> > Hey guys...
> > In my aspx page I have a textbox that when the user press Return I need
to
> > click a button. How can I do it?
> > OR
> > All the pages that contains buttons have a default button, but I don't
> > know
> > how to define the default button. If I do it, my problem will be solved.
> > Thank's
There may be some errant spaces in the code.

How about this?

Ken

<!--->
<%@. Page Language="VB" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
<script language="javascript">
function KeyDownHandler(btn)
{
// process only the Enter key
if (event.keyCode == 13)
{
// cancel the default submit
event.returnValue=false;
event.cancel = true;
// submit the form by programmatically clicking the specified
button
alert('Clicked');
btn.click();
}
}
</script
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Button Runat="server" ID="DefButton" />
<asp:TextBox Runat="server" ID="FirstName"
onKeyDown="KeyDownHandler(DefButton)" />
</div>
</form>
</body>
</html>
<!---
"Andr Almeida Maldonado" <deweb@.bol.com.br> wrote in message
news:OWahAJzUEHA.2716@.tk2msftngp13.phx.gbl...
> Hy Ken
> I make this:
> <asp:textbox id="txtEntrPrCB" onKeyDown="KeyDownHandler('btnEntrPrMa')"
> .....
> But when I press Enter, I receive this error:
> Object doesn't suport this property or method.
>
> WHY??? What I'm doing wrong?
>
> Thank's
>
> "Ken Cox [Microsoft MVP]" <BANSPAMken_cox@.sympatico.ca> escreveu na
> mensagem
> news:OFjqo8yUEHA.2668@.TK2MSFTNGP10.phx.gbl...
>> http://www.dotnetspider.com/Technol...px?SampleId=212
>>
>> "Andr Almeida Maldonado" <deweb@.bol.com.br> wrote in message
>> news:u9d7HtyUEHA.2692@.TK2MSFTNGP09.phx.gbl...
>> > Hey guys...
>>> > In my aspx page I have a textbox that when the user press Return I need
> to
>> > click a button. How can I do it?
>>> > OR
>>> > All the pages that contains buttons have a default button, but I don't
>> > know
>> > how to define the default button. If I do it, my problem will be
>> > solved.
>>>> > Thank's
>>>>
Andre,

The code Ken gave you will work, but event.KeyCode will only work for IE and
not netscape. If you want to, I have a bunch of useful javascripts all
rolled into a single component on my website, www.aboutfortunate.com. Click
the code library link on the top right of the page and then click the
javascript button in the menu on the left.

All code on my site is free and the full .NET v1.1 project is downloadable.
So even if you don't want to use the object as is you can get some decent
code examples from it.

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
"Andr Almeida Maldonado" <deweb@.bol.com.br> wrote in message
news:OWahAJzUEHA.2716@.tk2msftngp13.phx.gbl...
> Hy Ken
> I make this:
> <asp:textbox id="txtEntrPrCB" onKeyDown="KeyDownHandler('btnEntrPrMa')"
> .....
> But when I press Enter, I receive this error:
> Object doesn't suport this property or method.
>
> WHY??? What I'm doing wrong?
>
> Thank's
>
> "Ken Cox [Microsoft MVP]" <BANSPAMken_cox@.sympatico.ca> escreveu na
mensagem
> news:OFjqo8yUEHA.2668@.TK2MSFTNGP10.phx.gbl...
> > http://www.dotnetspider.com/Technol...px?SampleId=212
> > "Andr Almeida Maldonado" <deweb@.bol.com.br> wrote in message
> > news:u9d7HtyUEHA.2692@.TK2MSFTNGP09.phx.gbl...
> > > Hey guys...
> > > > In my aspx page I have a textbox that when the user press Return I
need
> to
> > > click a button. How can I do it?
> > > > OR
> > > > All the pages that contains buttons have a default button, but I don't
> > > know
> > > how to define the default button. If I do it, my problem will be
solved.
> > > > > Thank's
> >
hy
here is some code snippet:
-----------
put next code in Page_Load
TextBox1.Attributes.Add("onkeypress",
"if(event.keyCode==65)Form1.Button1.onclick();")
when you press 'A' in TextBox,preseding code excute
You can intercept the client side enter keypress event of the text box and
then do what you want using javascript code.
Here's a good example:
http://www.kamp-hansen.dk/pages/sho...id=21&menuid=18

You could also try using this free control.
http://www.metabuilders.com/tools/DefaultButtons.aspx

And here's a couple good articles on the subject:
http://www.allasp.net/enterkey.aspx
http://www.aspnetpro.com/features/2...p200406so_f.asp

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net

"Andr Almeida Maldonado" <deweb@.bol.com.br> wrote in message
news:u9d7HtyUEHA.2692@.TK2MSFTNGP09.phx.gbl...
> Hey guys...
> In my aspx page I have a textbox that when the user press Return I need to
> click a button. How can I do it?
> OR
> All the pages that contains buttons have a default button, but I don't
know
> how to define the default button. If I do it, my problem will be solved.
>
> Thank's