|
Hi..
I have a textbox that was firing Text_changed event when the user press Enter.but now it is not firing any more.But the handler for this event is executed when a postback occur(for example when I click a button).
The only change I made it was putting the asp:textbox in a <DIV> instead of a <table><tr><td>.
I observed when I press enter in the textbox I hear a sound(one of the windows usual sounds).
Could any one tell me how to solve this problem and make it working as before(when the user press Enter)?
I am too late but i will never give up
|
|
|
|
|
If you set the autopostback to true on the textbox it will postback when the text changes. I don't think you really want to do this, since it takes time for the web page to reload for each key press. You probably want to use some javascript for you text change event.
Ben
|
|
|
|
|
Hi..
It was working without autopostback.and the event was only fired when the user press Enter not any other key press.
I am too late but i will never give up
|
|
|
|
|
If it used to work it was by error. The enter key was probably causing a button to get pressed, since that what it does on the web. I would guess a one point that button didn't have any code in your code behind so you didn't notice it. What you are trying to do doesn't work.
Ben
|
|
|
|
|
Sorry but I don't think so because the textbox have the access(which change using TAB).
May you explain to me what do you mean by:
'since that what it does on the web.'
Please explain to me your idea because this is the only problem remain to me to upload updates to my old website.
I am too late but i will never give up
|
|
|
|
|
|
You can make textchange event for text box
by using java script.
If u need i'll explain it..
Sherin Iranimose
|
|
|
|
|
I need help, I am trying to print results loaded into a Datalist and I have not been able to make any headway. The datalist is loaded from a query and has the option of displaying detailed info or summary. I would like to print out (which ever is selected) the results as they are in the datalist.
I am new to this work and need some assistance.
hutch
|
|
|
|
|
I have a button( btnLogOut)in my master page. In page_load event of this master page I want
to verify if the button is clicked or not.
How can I do that.
Thanks in advance.
seema
|
|
|
|
|
|
I have a textbox, that records the file names of upload files, and seperates it out with a , I would like to create an array that would read this text box, and seperate it out, so I can create a link for each file. I could really use some examples in code. My codebehind is C#
|
|
|
|
|
string[] FileNames = txtFileNames.Text.Split(',');
|
|
|
|
|
So then it will string as them as? like how do I assign each portion of the string a varible? Or am I not getting something as simple? Trying to figure out how I would link them.
|
|
|
|
|
Something like this no?
string FileNames[1]=dr["HyperLink1"].ToString();
|
|
|
|
|
Put a placeholder control in the screen, read the filenames and dynamically add link buttons and the click event for each of the links.
|
|
|
|
|
If I understood any of this, I imagine I'd be in good shape. Pardon me, I've only been using .net for about 3 months before, that had never developed anything, and was given a full blown, huge ass project by my work, they know I can't code C# and I am still learning, they just elinated my job... I hate to be a pain in the ass, but could you explain a little further?
|
|
|
|
|
Have a look at this article[^] on codeproject, it shows you how to create dynamic controls. This msdn[^] shows you how to add controls to a place holder.
In the click event of the button, split the filenames into an array, for every item in the array create a linkbutton with a click event and add it to the placeholder
ex:
LinkButton link;
for(int i = 0; i <= FileNames.Length-1 ; i++)
{
link = new LinkButton();
link.ID = "link"+i.ToString();
link.Text = "http://www.yoursite.com/uploadedfile/"+ FileNames[i];
link.Click += new EventHandler(link_Click);
PlaceHolder1.Controls.Add(link);
}
Instead of the linkbutton you can also use the label control and set the text of the label control as Label1.Text = a href to pass the location to it.
This is just a sample code, just change it to how you need it. You will have to ensure that the controls get added back when a postback takes place.Last modified: 16mins after originally posted --
|
|
|
|
|
Thank you, and I am glad your willing to help such a newb like myself, but believe me, I am trying to help myself at the same time. Thanks for links to articles on this, will most definately read. I found some good help in my Visual C# .Net book as well.
|
|
|
|
|
Both links went to code project
|
|
|
|
|
Sorry. I Have changed it now, have a look.
|
|
|
|
|
This is going to be great for my upload on my main form that they upload on, but for the page I am doing this on, its just to view, they will not be allowed to upload any files, just vewing files attached to a helpdesk record.
|
|
|
|
|
Just pass the string to the required page or store it and retrieve it from some location and do the same thing.
|
|
|
|
|
I am trying to write a dataset upon login and write certain information retrieved from an Access db (I hate Access but right now the SQL box isn't available so I'm hitting the Access db as little as possible). When I populate the DataSet and use DataSet.WriteXML it's giving weird results. Also, when I login in a 2nd time (with a different user, the only part that works is searching the XML for the user I'm logging in with if it exists then dont rewrite it) I want it to append it to the existing XML document and even this isn't working right, the .WriteXML is giving a result like
<newdataset>
<Table>
<_x0027_u_name_x0027_>rlmccutchen<_x0027_u_name_x0027_>
<_x0027_u_pwd_x0027_>*********<_x0027_u_pwd_x0027_>
<_x0027_f_name_x0027_>Richard<_x0027_f_name_x0027_>
<_x0027_l_name_x0027_>McCutchen<_x0027_l_name_x0027_>
<_x0027_email_x0027_>richard@psychocoder.net<_x0027_email_x0027_>
<_x0027_is_admin_x0027_>1<_x0027_is_admin_x0027_>
<_x0027_total_posts_x0027_>0<_x0027_total_posts_x0027_>
<_x0027_client_id_x0027_>1<_x0027_client_id_x0027_>
<_x0027_user_id_x0027_>1<_x0027_user_id_x0027_>
<_x0027_site_name_x0027_>RamEngine<_x0027_site_name_x0027_>
</Table>
</newdataset>
<newdataset>
<Table>
<_x0027_u_name_x0027_>jbunton<_x0027_u_name_x0027_>
<_x0027_u_pwd_x0027_>*********<_x0027_u_pwd_x0027_>
<_x0027_f_name_x0027_>Jack<_x0027_f_name_x0027_>
<_x0027_l_name_x0027_>Bunton<_x0027_l_name_x0027_>
<_x0027_email_x0027_>ramremfg@aol.com<_x0027_email_x0027_>
<_x0027_is_admin_x0027_>0<_x0027_is_admin_x0027_>
<_x0027_total_posts_x0027_>0<_x0027_total_posts_x0027_>
<_x0027_client_id_x0027_>1<_x0027_client_id_x0027_>
< _x0027_user_id_x0027_>2<_x0027_user_id_x0027_>
<_x0027_site_name_x0027_>RamEngine<_x0027_site_name_x0027_>
</Table>
</newdataset>
I've been raking my head for days now trying to solve this so I canh move on to a new piece. Can someone please help.
" In the next millennium there are two kinds of business, those on the Internet and those out of business"
Bill Gates
"Be nice to nerds. Chances are you'll end up working for one."
Bill Gates
"Let's face it, the average computer user has the brain of a Spider Monkey."
Bill Gates
|
|
|
|
|
RLMcCutchen wrote: When I populate the DataSet and use DataSet.WriteXML it's giving weird results.
Like what?
RLMcCutchen wrote: Also, when I login in a 2nd time (with a different user, the only part that works is searching the XML for the user I'm logging in with if it exists then dont rewrite it) I want it to append it to the existing XML document and even this isn't working right, the .WriteXML is giving a result like
Are you using a stream or directly writing it into a file? Looks like you are opening a filestream writing the file and opening the file again and appending the 2nd user's data, in this scenario the xml will get appended to the previous xml in the file.
If you post the code you are using, then we could find out the problem.
|
|
|
|
|
Tarakeshwar Reddy wrote: RLMcCutchen wrote:
When I populate the DataSet and use DataSet.WriteXML it's giving weird results.
Like what?
The weird results are the XML I posted in the original post. The column names arent what they are coming from the database. Granted I dont do a lot of work with XML and I've spent some time researching it but I feel like I'm beating my head against the wall. Once I get home I'll post the code but right now I'm at work and dont have access to my home development machine.
Part 2
I do want the XML appended but the way its doing it its adding a 2nd root element which cant happen so I'm trying to figure out how to add the other users as they login without adding multiple root level elements.
" In the next millennium there are two kinds of business, those on the Internet and those out of business"
Bill Gates
"Be nice to nerds. Chances are you'll end up working for one."
Bill Gates
"Let's face it, the average computer user has the brain of a Spider Monkey."
Bill Gates
|
|
|
|