|
Sir,
I want to select the text in the textbox after postback.
with the following code i am able to put the curson in any textbox.But cann't select the text in the textbox after the postback.
Please help.
Public Function SetFocus(ByVal FocusControl As Control) As String
'Setting focus to supplied control
Dim Script As New System.Text.StringBuilder
Dim ClientID As String = FocusControl.ClientID
'Building java script
With Script
.Append("")
.Append("document.getElementById('")
.Append(ClientID)
.Append("').focus();")
.Append("")
End With
Return Script.ToString()
End Function
From your aspx form call that function to set focus on your textBox
'set focus
RegisterStartupScript("setFocus", Utilities.SetFocus(txtName))
|
|
|
|
|
document.getElementById('textbox').select();
regards,
g00fy
|
|
|
|
|
Hi,
I want to secure my application, so that user may not type the name of a page in the browser and go to certian page.
And also that there is some history stored in the browser, so user should not use that history (eventually which is auto fill also) to go to a certain page using those old querystrings.
can you please suggest me a way out.!!
Thanks in advance.
Deepak Surana
|
|
|
|
|
You can write your app so it always posts to the same URL, and displays different controls/pages based on viewstate, so there is also nothing on the URL.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
How can this be done.
It would be great if any code snippet is provided for help.
|
|
|
|
|
hi,
i want to clear the history (the back button history) of the browser.
can it be done by either ASP.Net or Javascript.
please provide me the code for the same.
Thanks in advance.
Deepak Surana
|
|
|
|
|
You can't do that.
--------------------------------------------------------
My portfolio & development blog
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
Im using asp 2.0 and I want to use thier new postback methods to populate dropdowns without postbacks. When a user selects a value from one dropdown, it repopulates the other dropdown. Can i have some help and ideas on how best to achieve this?
|
|
|
|
|
I think that you are not using ASP 2.0 at all, but ASP.NET 2.0. I Also think that you mean a Javascript array, not a Java array.
Use the Page.ClientScript.RegisterArrayDeclaration method to register an array in the client script.
The method doesn't populate any dropdown for you, though. You still have to write the client script that uses the array to populate it.
---
b { font-weight: normal; }
|
|
|
|
|
Hi,
I am confused that in case of asp.net application, why we manage different projects in a same solution . Even classes, Events and properties can be defined in the same project, so why we create it in a seprate project and make common namespace for whole solution.
for eg.--->
In asp.net application--> few classes in one project --> few classes in another project --> in the same solution--> in the same namespace.
nikki
|
|
|
|
|
Friends
Suggest Some Business Domain For me to Develop in Asp.net.Lut us Make it Difeerent And Intresting. i prefer Online Domains
NIJU C
|
|
|
|
|
Hi,
Ive created a WebSerive Transactions. in webservice i have a class CardInfo.
I like to use this class in the caller. Even adding refernce i havent got the cardInfo class on the client. Do i need to set any attributes
|
|
|
|
|
|
I would like to call a javascript method when the user changes the URL in the browser's address bar, it should be another domain and not the other domain. The scenario is that in our application, there are some external links available. If they click on that, it will load the external URL. The method should not be called when they click these hyperclicks. Method should be called only when they type in the address bar.
|
|
|
|
|
I just download the express edition and love the new feature but have questions. I have a database ready that has my members data in it. Is there a way to set the up the roles/Members/security to use this database?
|
|
|
|
|
I have a lot of Windows forms, SQL, C#/ADO.NET experience, and some ASP.NET experience, but it is mostly fixing bugs, rather than development from scratch. Because of that, I'm still confused about a lot of the funcitonality of ASP.NET, including still being very fuzzy about the difference between client and server.
Anyways, I'm asking for recommendations for either books or websites (other than CP) that you have used and found very useful. I'm really trying to get hands-on examples on asp.net programming with C#, so I can bring it up to par with my other programming skills.
Thanks in advance.
|
|
|
|
|
I know this isn't a book but I have found these videos useful. www.learnvisiostudio.net
|
|
|
|
|
|
|
I concur with Sunday
regs,
g00fy
|
|
|
|
|
Programming ASP.NET by Jesse Liberty and dan Hurwitz.
3rd edition is .NET 2 and C# only (not sure whether they've provided downloadable code for VB). 2nd edition is C# and VB and .NET 1.1. I own the first edition.
Kevin
|
|
|
|
|
You know, I swear by Liberty's C# book, and I didn't know he had an ASP.NET book. Guess I'll definetely be picking this one up.
|
|
|
|
|
Yeah, he's a good author. Programming C# 4th edition got a bad review in the last CVu magazine by these guys - ACCU[^]
I've not seen the 4th ed but I own the first ed and thought it was excellent. I did take issue with the critic though.
Kevin
|
|
|
|
|
this one would appear pretty cut and dry at first. I Am being histed by godaddy, and when i try to use any of my web pages that touch the SQl db i have with them, i am getting the awful "Login request failed" error, which lists the machine account as the login that is failing. I would usually add the asp .net account or machine account to the user's group if i was running the db myself. Obviously, i cant do that in this situation.
is there a "real" fix for this kind of problem? So that when the web app goes to the sql server, it uses the information i am trying to pass through the conenction string, not the account running the app?
______________________
Mr Griffin, eleventy billion is not a number...
|
|
|
|
|
I am converting a winforms application to a webforms application. In the winforms application the user will choose a file or folder from a CD and those files are copied to holding area on the network. What would be the best way to accomplish this task in a webforms app?
Would File.Copy allow the user to choose a file from their workstation and then copy it to the network in a webform app the same as a winform app. Or, is there a better solution?
|
|
|
|