|
Hi,
My text (notepad) cotains few ascii characters; one of which is ENTER symbol (like a square box).
I want the text as it is, while I paste it to a textbox. (Access it through Textbox.Text property in code) -- Asp.net/ vb.net
Instead,
(i) when I pasted in a textbox with text mode as single line, the portion of the text before the enter symbol alone pasted.
(ii) when I pasted it in the with text mode as multiline, then it is pasted as two lines.
Is there any way to get the same text in textbox?
Jey
|
|
|
|
|
No - in fact, it's notepad that's messing with you, the textbox is correctly showing you two lines, if it's in that mode. If it's not, it's correctly stopping at the end of the single line.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
For performance I would like to switch between https and http automatically depending on if the page content is sensitive. I am hosting on godaddy which does not allow you to turn on SSL for a directory. I'm trying to think of the most clever way to accomplish this. One idea which I am using is to have 2 master pages, default.master and defaultsecure.master. The pageload event swaps the users protocol, if necessary. This way I can simply mark a page a secure by masterpage and know that the user will access that page via https and go back to http when back to a public page.
Is there a more clever way of doing this? Or some setting I missed in the web.config? I'm using .net 2 login controls and was surprised there was nothing there to support this.
|
|
|
|
|
iam havaing a text box where the user enters the date in any formate but the it should get get in dd/mm/yyyy
|
|
|
|
|
You need to know which format the user chooses to enter it in, otherwise how can you tell the difference between:
09/10/2007 (9th October 2007)
&
09/10/2007 (10th September 2007)
Have you considered a calendar control?
|
|
|
|
|
while casting string to Datetime .User IFromatprovider
P.S.
|
|
|
|
|
Hi1 i have an XML file that contains RSS feed data. my task is to read the data of RSS feed into a dataset 7 then to create tables in the dayabase corresponding to each table in the dataset with relationships & primary keys. i have successed reading data into dataset & then inserting into database. now i want maitain relationships among these tables with primary key for each table. can any help me?
|
|
|
|
|
Hi...
Is it posible to delete a file (from a hard disk) after adding it into the database by clicking on a button. (the click event allready stores the file in the database) I want to delete the file (from the hard drive) using asp.net. BUT is it possible to do this using asp.net code???
I am very new to asp.net but have worked with c# before. (and a little vb.net --- but not much)
2nd question... als in ASP.net
How do i gain focus on a control? (lets say "myTextBox")
i thought it should work like this... myTextBox.Focus(); but this is not working... Why not? It seems to work in the form load but not on the button click event???
"Many of life's failures are people who did not realize how close they were to success when they gave up." Thomas A. Edison
|
|
|
|
|
Hi,
you can delete file if you are having permission to delete it.
Create fileinfo object of that file and then delete it.
And to set focus you can do below code.
private void Set_Focus(string controlname)<br />
{<br />
string strScript;<br />
strScript = "<script language=javascript> document.all('" + controlname + "').focus() </script>";<br />
RegisterStartupScript("focus", strScript);<br />
}<br />
Thanks,
Sun Rays
To get something you must have to try once.
My Articles
|
|
|
|
|
Thank you i will try it
"Many of life's failures are people who did not realize how close they were to success when they gave up." Thomas A. Edison
|
|
|
|
|
Hi,
I am developing an application which needs, to open the file in the browser, the file can be of any type (i.e.) Word Document or excel sheet or Jpeg image or any thing
Can any one suggest some mechanism to do this.
I am developing ASP.Net web application with VB.Net
Thanks in advance
|
|
|
|
|
Hi,
you can do Reponse.Redirect("full Path of file")
So it will open file in browser.
Thanks,
Sun Rays
To get something you must have to try once.
My Articles
|
|
|
|
|
But the browser will only open those file types that it can support within itself. If you try to, for example, open a .cs file, it will open outside the browser.
|
|
|
|
|
Friends,
My cookies value gets reset between every two or three redirect between pages. The cookie value does not reset in mozilla or some version of IEs.
So the problem is not with the code. I have checked everything in IE options also . Wat might be the problem?
|
|
|
|
|
hi everybody,
i just want da info regarding how to write a code when a button is clicked.i hav a few textboxes and some buttons.a letter is to be displayed in textbox where the cursor is focussed when a button containig a text is clicked.for ex if i click button A,then a is to be displayed in textbox.
please help me out.
thankyou...
|
|
|
|
|
Hi,
its realy very simple question
try below code on ButtonClick event.
Double click on button.
Textox1.Text = ButtonA.Text;
Write this code on every button click, just change Button...
Thanks,
Sun Rays
To get something you must have to try once.
My Articles
|
|
|
|
|
Do you want this to happen immediately, or for the page to post back ? If the former, you need to write javascript to run when the button is clicked, to find the textbox control and put text in it.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi
Does anyone know if using SSL is the best method to provide a secure connecion between SQL Server and a Web Server?
cheers
|
|
|
|
|
Hi all,
I sit with an issue and have absolutely no idea why it is happening.
I have a DropDownList, as follow:
<asp:dropdownlist id="ddlPaymentMethod" runat="server" onselectedindexchanged="ddlPaymentMethod_SelectedIndexChanged">
</asp:dropdownlist>
Then in the code-behind I have the following:
protected void ddlPaymentMethod_SelectedIndexChanged(object sender, EventArgs e)
{
if (ddlPaymentMethod.SelectedIndex.ToString() != "")
{
SetDivVisibility(ddlPaymentMethod.SelectedItem.Value.Trim());
}
}
But for some reason, when I run the program, and change the value within the DropDownList, it never enters the SelectedIndexChanged event.....
Any ideas or solutions would be greatly appreciated
Thanks in advance
No matter how long he who laughs last laughs, he who laughs first has a head start!
|
|
|
|
|
Hi,
set property AutoPostBack = True in Dropdown list...
Thanks,
Sun Rays
To get something you must have to try once.
My Articles
|
|
|
|
|
Thanks, working like a dream now.
No matter how long he who laughs last laughs, he who laughs first has a head start!
|
|
|
|
|
Hi
I currently use Visual Web Developer 2005 Express Edition to write .net and c# code.
Does anyone know of any problems with uploading files from Visual Wev Developer to a web server?
cheers
|
|
|
|
|
is there any specific problem that your are facing????
|
|
|
|
|
No I havent encountered any problems.
The reason I ask it because I am currently using VWD to upload to a citrix server and wondered if there was any problems with uploading to a web server?
cheers
|
|
|
|
|
I have a requirement.I have a user control in which based on the enum selection I need to add textbox or combobox at design time.For example if enum value = 0 then textbox should be added in usercontrol - if enum = 1 them combobox should be added.The changing of enum value will be done from form1.Means the
blank user control will be droped on the form.From that from I will change the enum value.Based on that
the control should be created.and the controll should hold all its properties.
Can any body help me for this.
|
|
|
|