|
Good Day
You are Right the View is the Class name of the page aspx and i used javascript because i wanted to handle the keyPress event of the textbox
function keyPress() {
var tb = document.getElementById("<%=txtsearchid%>");
if (tb.value.length == 2) {
PageMethods.Getadata(tb.value, myFunction(tb.value));
ToggleCollapsePane();
}
return false;
}
and take the value that has been entered on key-press and execute the function.
Thanks
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
modified on Tuesday, August 10, 2010 10:15 AM
|
|
|
|
|
OK, so look at the HTML generated by your site. The textbox, that you have you event attached to should have its change event set. (I assume, the textbox you're fighting with right now is the same.) Set the same value for the keyPress event of the textbox and it should work.
Don't forget to rate answer, that helped you. It will allow other people find their answers faster.
|
|
|
|
|
Yes the Textbox is the same.
<br />
Set the same value for the keyPress event of the textbox and it should work.
can my give me an example
Thank you for your help
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
OK. At last I have Visual Studio to prepare an answer
<asp:TextBox runat="server" ID="text" OnTextChanged="Bind_SearchBox" onkeyup="this.onchange();" AutoPostBack="true" />
AutoPostBack="true" is required for this to work.
Don't forget to rate answer, that helped you. It will allow other people find their answers faster.
|
|
|
|
|
Good Day
Thank you for your kind reply.
i have changed my textbox from this
<asp:TextBox ID="txtsearch" runat="server" Font-Size="X-Large" onkeypress="keyPress()" Height="40px"
Width="650px"></asp:TextBox>
to this
<asp:TextBox runat="server" ID="txtsearch" OnTextChanged="Bind_SearchBox" Font-Size="X-Large" Height="40px" Width="650px" onkeyup="this.onchange();" AutoPostBack="true" />
and i get an Error that says
Error 4 No overload for 'Bind_SearchBox' matches delegate 'System.EventHandler' C:\Pilot Project\View.aspx 99
Thanks
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
Yeah, my mistake. Add method
protected void Bind_SearchBox(object sender, EventArgs e)
{
if(sender.Equals(txtsearch))
{
Bind_SearchBox(txtsearch.Text);
}
}
Don't forget to rate answer, that helped you. It will allow other people find their answers faster.
|
|
|
|
|
You know what ?
You are a Star , it works very nicely , i just need to add ajax to remove the flickering of the page.
Thanks my friend
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
Hi
I'm running couple of SQL Server instances in two different instances, Instance A is the master which replicates the data to Instance B. Im running Transaction Based replication, which working well.
Now I want to route the WRITE (Insert, Update, Delete) calls from my ASP.Net application to Instance A and READ (Select) calls to Instance B?
Is there any load balancing mechanism available to do this?
Thanks
|
|
|
|
|
C# forum is probably not the correct place for this, I doubt if the database forum will be any better but I would try there. You may be better served by using a dedicated database site - SQLServerCentral.com comes to mind. This really is a DBA type question (rather than a developer question).
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
satsumatable wrote: Now I want to route the WRITE (Insert, Update, Delete) calls from my ASP.Net application to Instance A and READ (Select) calls to Instance B?
Have you tried anything?
The databases only have replication running between them right? So that means that the two databases are distinct entities that can be connected to using separate connection strings. If your application has a dedicated DAL, all the change you need to make is have two separate methods that open a connection, something like
OpenConnectionForWrite()
OpenConnectionForRead()
and your code can call the appropriate method depending on whether it's reading or writing.
SG
Aham Brahmasmi!
|
|
|
|
|
I m planning to develop a payment gateway Application.
Do any body have some tutorials or sites where i can get some good exposure to Payment gate way development
Thanks in advance
|
|
|
|
|
I would like to know how often you all build and run a project during development. As far back as I can remember, when I first started programming (C++ with the Dev-C++ IDE) I find myself building/running a project quite often. Usually every time I add something new or fix a problem in the code.
Is there some sort of general practice for how often you should do this? Or does that not matter? BTW, I am referring to developing on a single machine. I don't have any experience in a team environment and I have never used any kind of source control.
|
|
|
|
|
Build early, build often.
|
|
|
|
|
Thanks. That's what I figured but I had a bit of doubt at first, thinking something is wrong if you must build quite often. :-P
|
|
|
|
|
I build all the time. When I add 10 lines of code, I build, run, test and fix. When I change a few lines, ditto. I make sure my project can always be built, and all new/modified code gets tested right away.
|
|
|
|
|
I used to build the component that I work and it's dependencies frequently. But I usually won't build the whole application all the time as it takes more time. On the current project we have a continuous integration server available which will build the whole project once the code is checked in.
Build architecture for C++ projects and C# projects are different. C++ uses incremental approach and only those files that are modified gets compiled. This is a huge time saver after the initial compile. In .NET (except C++/CLI), this is handled at the project level. So if any of the files got modified in the project, VS will compile the whole project rather than just one file. So improper project organization will lead into longer build time.
Best wishes,
Navaneeth
|
|
|
|
|
There is nothing wrong in building your project.
build and run as much as you can and be happy watching your project work in right way 
|
|
|
|
|
Build early, and build often.
It serves two purposes:
a) It ensures that what you have written recently compiles cleanly while it is still fresh in your mind.
b) It ensures that all changed files are saved. You can never save too often! "Nice computers don't go down" perhaps - but all the ones I've used have!
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
|
|
|
|
|
OriginalGriff wrote: Nice computers don't go down
Gotta be worth a 5!
DaveIf this helped, please vote & accept answer!
Binging is like googling, it just feels dirtier.
Please take your VB.NET out of our nice case sensitive forum.(Pete O'Hanlon)
BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
|
|
|
|
|
"You can never save too often!" -- I agree completely. When I first picked up on C++ I had a really old Windows 98 SE system. I received crashes quite often due to low memory, CPU, etc. At that time I typically only saved when I got ready to test new code I had added. When it would crash I would lose so much work.
So I have made a frequent habit of hitting Ctrl+S. Even if I add a previously forgotten punctuation mark in a comment, I usually go straight to Ctrl+S.
Thanks everyone for your responses. I don't feel so odd about it now. 
|
|
|
|
|
Don't let a PC lull you into a false sense of security.
"It hasn't crashed for ages! just means it's waiting for the most inopportune moment to do the nasty on you.
Save often.
Copy files from project to somewhere else if you don't use source control.
If you go for source control look for one that works rather than SourceSafe.
|
|
|
|
|
Hello,
I want to know how can i encrypt an xml file that contains my connection string properties include username and password.
Thanks a lot.
|
|
|
|
|
|
If you're using SQL Server, use integrated security instead.
|
|
|
|
|
If you read and write the XML file using a text or XML streamer, you can just plug a CryptoStreamer in.
|
|
|
|