I am currently working on coding my own forums pretty much from scratch, and as such i want to allow users to edit their posts.On the edit page they're taken to i'd like to insert the text from their post into a Textbox, have them edit the text directly in that textbox and then submit it back to be updated in the database.Inserting into the database and updating and etc. is all no problem.If i want to insert the text from the database into the textbox i figure i'd retrieve the data from the db during Page_Load and just assign that string into Textbox.Text.But, even if the user enters something entirely new into that textbox, since the text was assigned on last postback it doesn't change when the user wants to submit.And that is the issue i have at hand.
in my current scenario i can't use any server controls.there is an input type button when click on this a span should come and act as water marker giving some message when you click on the message any where a run time generated text box should come in place of span.
where user can input the value and after entering if he click any where on the form the value should be assigned to new span generated run time .An example to visualize my scenario is given below i am also making a tree.
I have a simple form containing two text boxes, I am attempting to apply some validation to the first text box using JavaScript. This is the first time I have attempted this and am having some trouble.
I have a label beside the text box stating an error, this labels visibility property is set to False. I wish the labels visibility to turn true if the text box is empty when the user loses focus.
For this I have used the onBlur option within the tags of the text box. It then calls the JavaScript function and should set the label to Visible but it does not. I have tested to see if it is entering the function by using an alert instead and that works. The problem seems to be trying to alter the visibility property of the label.
Here is the portion of my code:
The JavaScript:
function myRegEx(frm) { if ( boxUsername.value == "" ) { invalidUser.visible = True; return false; } }
The form:
<asp:TextBox onblur="return myRegEx(this)" id="boxUsername" runat="server" Width="200px"></asp:TextBox> <asp:Label id="invalidUser" runat="server" visible="False" forecolor="Red" text="* Username must be alphanumeric with no special characters"></asp:Label>
i'm creating a webpage that contains a text box, whenever i type something in the textbox, i used to show some suggestions like google suggest.
I'm using a div tag to show suggestions and each suggestions is a div tag, so on clicking any of the suggestion, it will be loaded into the textbox, but i can't able to edit the suggestions easily, whenever i want to modify the selected suggestion in textbox, clicking the mouse pointer at some place of the suggestion and pressing backspace removes a single character from the suggestion and return to the end of the suggestion.
what is my ip
when i want to remove "my" in it, it will remove "y" from "my" and return the cursor to end of suggestion (i.e.,) after ip,
whenever there is a keyup event occurs on the textbox, then i use show suggestions that is similar to the entered character.
I've textbox which has data: This is not valid data for [Smith] [Jackson], Now the user can't edit the text which is in between the [] brackets. How to prevent them from editing the text in brackets? Can we prevent with Javascript? or Is there any other alternatives?
On Wikipedia you can edit a document and you can see what the different versions of the document looked like: http://en.wikipedia.org/w/index.php?title=ASP.NET&action=historysubmit&diff=342825222&oldid=337869406 Is there something free or some code samples out anywhere that will quickly let me create similar functionality with ASP.NET?
I have a gridview which I use to edit text fields. How is it possible to start a new paragraph when entering text? I'm hoping that this can be done without using markup, as the users are not neccessarily going to be particularly computer literate.
I have a client who needs to paste sections of Word documents into my SQL Server 2005 database. There are paragraphs and bullet points within the text that has to all go into the same field. When I copy and paste the text straight from Word the bullet points are displayed as dots but not as a list, i.e. the text is wrapped continuously and the formatting is lost. I have built a web front end in ASP.NET 2.0 using formviews for data display, editing and entering. If I use a Access backend the text will display correctly if the bullets are replaced with <li> tags - a bit tedious for the user of course. In SQL server I am getting a security warning that stops any HTML code to be pasted into a field. I thought of using stylesheets but even this is difficult.
i have a grid view and check box in it. and there are 5 columns in it. user name, first name, lastname city and ph no. and 5 text boxes... and a edit button NOW when i check any checkbox and press EDIT button i want the entries in grid view show be entered into text boxes.
We developed an application to edit the web.config settings. The user has to locate the web.config file which they like to edit. Once their task is completed they can download the web.config file with the changes made by them. Since the web.config file has the database server information and passwords I have a concern that will it cause any security problem.
Currently we are saving files (PDF, DOC) into the database as BLOB fields. I would like to be able to retrieve the raw text of the file to be able to manipulate it for hit-highlighting and other functions.Does anyone know of a simple way to either parse out the files and save the raw text on save, either via SQL or .net code. I have found that Adobe has a filtdump utility that will convert the PDF to text. Filtdump seems to be a command line tool, and i don't see a way to use a file stream. And what would the extractor be for Office documents and other file types?-or-Is there a way to pull out the raw text from the SQL Full text index, without using 3rd party filters?Note i am trying to build a .net & MSSql solution without having to use a third party tool such as Lucene
I'm using Visual Studio 2008 on Windows 7. When I'm editing .aspx file VS stalls and thinks for about 3 sec every time I add a tag. Very frustrating. I'm guessing its doing some kind of compilation or checking. What can I do to make VS more responsive?
I am developing a mobile application that requires text entry in a mobile:textbox component. I want it to only accept numeric and "#*". when I press the "1" key on my mobile phone it should enter a "1", not "a", "b", "c", etc.
I have an input type, so a text box which has a browse button next to it. When it is clicked, the file that is selected has it's full path placed into the text box.
Where is the event! Now that I have the path to the file in the textbox of the input type, I want to load each line of this file into a textbox that is able to handle multiline text. I don't want the file to be uploaded to the website. I just want to contents of the file read and placed in a textbox all with one click on the browse button.
I have an input type, so a text box which has a browse button next to it. When it is clicked, the file that is selected has it's full path placed into the text box.
Now that I have the path to the file in the textbox of the input type, I want to load each line of this file into a textbox that is able to handle multiline text.
I don't want the file to be uploaded to the website. I just want to contents of the file read and placed in a textbox all with one click on the browse button.
I'm trying to read the contents of a text file into a text box on my form. When I run the following code, nothing happens.
VB.NET Code: Protected Sub lbLogs_SelectedIndexChanged(ByVal sender As Object, ByVal e As EventArgs) Handles lbLogs.SelectedIndexChanged For Each li As ListItem In lbLogs.Items If li.Selected Then Using sw As New StreamReader(li.Value) txtLog.Text = sw.ReadToEnd sw.Close() End Using End If Next End Sub
I populate the ListBox with ListItems and each ListItem's Value property holds the full path to the file. But, I removed all of that and just put txtLog.Text = "test" inside of the "is selected" block.
I want to save the text data that coming from the database into the Text files.Suppose if i have dataset that contains 10 rows then i want to generate 10 text files and each text files contains associated row data.Finally i want to save them in the folder.Mail all the text files as a compressed format like zip and send them to the user.
I have an application I am trying to write that generates a text file conforming to a file specification, and the file could contain thousands of lines. This part is easy. The more challenging part for me is the user interface. It needs to be a web interface with various options to affect what data gets on the file; this part is no problem. The process for generating the file, though, could take a little time depending on the amount of data , and I would think the web page would time out.
What options do I have for the UI? Could I create some sort of service that the page calls and runs in the background? When the process errors or is finished, I'm thinking there could be an email sent out, or even messages displayed on the page.
In an ASP.NET WebForms 2.0 site we are encountering an intermittent bug in IE6 whereby a file download attempt results in the contents of the being shown directly in the browser as text, rather than the file save dialog being displayed. Our application allows the user to download both PDF and CSV files. The code we're using is:
This is called from the code-behind click event handler of a button server control. Where are we going wrong with this approach? Edit Following James' answer to this posting, the code I'm using now looks like this:
HttpResponse response = HttpContext.Current.Response; response.ClearHeaders(); // Setting cache to NoCache was recommended, but doing so results in a security // warning in IE6 //response.Cache.SetCacheability(HttpCacheability.NoCache); response.AppendHeader("Content-Disposition", "attachment; filename="theFilename.pdf""); response.ContentType = "application/pdf"; response.BinaryWrite(MethodThatReturnsFileContents()); response.Flush(); response.End();
However, I don't believe that any of the changes made will fix the issue.