|
instead of an html textarea use an asp:Textbox with it's multiline property set to true - this will render as a textarea - and then simply set it's Text property to the appropriate dataset field in your code behind.
|
|
|
|
|
Hi, thanks for responding, but how do I control the number of results displayed per page.
|
|
|
|
|
Use custom paging using stored procedure. You can use hyperlinks to navigate through the pages.
|
|
|
|
|
hi ....
is any one here that understand encoding of a string ?
for example consider a text box in a webpage , i want to after user fill it and send to server understand it's encoding (is utf8 or unicode ....)
|
|
|
|
|
|
tanks
i save that and i am going to test it
|
|
|
|
|
Glad to Help Always
SSK.
|
|
|
|
|
I was wondering what the typical site structure is that people use for asp.net sites?
I am using C# asp.net 2.0 and have a default.aspx page which points to a master page, MasterPage.master (which contains references to images, javascript, etc).
I would like to organise sub-areas like: mysite.com/subdir/Default.aspx
So I created this above page, and reference the MasterPage.master, but when I navigate to this page (during run mode) the images and javascript are messed up since they're all being referenced from the directory above (in which the masterpage resides).
Is there an elegant way of getting around this problem? I was thinking of creating a 'sub-level' master page but this won't be ideal since then any changes to the masterpage will require double the efforts (which kind of goes against what a master page is about anyway!)
Do most asp.net sites ONLY use the root directory?
Any help much appreciated!
Gerry
asp.net newbie
|
|
|
|
|
One thing I learned when using Master Pages and wanted the Master in its own directory (which I think is a good idea) is with all the images, style sheets, .js files and such to add this around them:
<%=ResolveClientUrl("~/YourDirectory/YourStyleSheet.css") %>
<%=ResolveClientUrl("~/YourDirectory/YourImageName.jpg") %>
<%=ResolveClientUrl("~/YourDirectory/YourScriptName.js") %>
Then (of course) replace my place holders with your information (example, your header is located in images/main_images then the tag around the header image would be
<%=ResolveClientUrl("~/images/header.jpg") %>
Hope this at least gets yous tarted.
"Let's face it, the average computer user has the brain of a Spider Monkey."
Bill Gates
|
|
|
|
|
Thanks very much Psycho Coder, this seems to fix it just dandily fine!
|
|
|
|
|
Not a problem, thats what this community is for
PS: When someone gives you the solution that works you should give them a 5 vote on their answer
"Well yes, it is an Integer, but it's a metrosexual Integer. For all we know, under all that hair gel it could be a Boolean."
Tom Welch
|
|
|
|
|
Done.
What a wicked community?!
I just posted a new post (at the top)
G
|
|
|
|
|
I hosted one page and also bin directory,web.config and precompiledapp.config while deploying will get these files.i just add only two controls in that page one HTML Text box and one Asp Label Control but when i open that page i could see only the Html Text box, Label is not shown in that page.But when i check the source of this page i could see the Label and its Text.what is the problem is there anything should i host.
|
|
|
|
|
I'm upgrading a ASP1.1 program to ASP 2.0. In the original application I used eWorld's NumericBox. In the ASP2.0 I have gone to eWorld and got the latest 2.0 controls. When I run my 2.0 application on my local computer it works fine. However when I publish to my web host server it cannot find the eWorld controls. From searching and reading many posts I have to add the eWorld as a Reference and set copy local to true. However I can't figure out how to do this. I have the Visual Web Developer 2005 Express Edition and when I right click on the project I then click on Start Options and then on References. In the References window it shows Accessibility GAC 2.0.0.0. I then click Add Reference and find/select Excentrics World Controls .NET 2.0.6.2393 C:\rogram Files\Excentric ... I then press OK and would expect it to be added to the list of References just under the Accessibility entry ... however it doesn't seem to get added and subsequently I can't specify the 'copy local' option. What am I missing?
Help appreciated
gregart
|
|
|
|
|
It looks like your referencing something installed into the GAC locally. If so, this is fine for local developement, but won't work if deployed to another server where the control(dll) is not installed in the GAC on that server.
You should be able to place the DLL inside your bin folder of your .net project and have it work properly. I've not used the control(s) your speaking of, but should be similar to that of other controls and libraries.
|
|
|
|
|
Thanks ... I did have the dll in the bin folder but it doesn't find it there ... I think I need to set up a reference but as I said not sure how to do this. There is also the register line in the .aspx file - right now I have it as follows: <%@ Register Assembly="eWorld.UI" Namespace="eWorld.UI" tagprefix="ew" %> - there seems to be a src parameter but I'm not sure if this can be used to point to the bin folder - tried it but it generates different errors...
cheers
gregart
|
|
|
|
|
I downloaded the control(s) from eworld to do a little mock up for you.
Keep in mind I did not install this in the GAC, as I wanted to use just the dll from the BIN directory. You can install it however you want, I just wanted to show how to use it without it being installed in the GAC.
I made two pages, one loads the control dynamically, the other page use the register attribute and adds the control at design time. Hopefully this gets you going.
http://www.ewilburn.com/downloads/EW_example.zip
|
|
|
|
|
Hi,
Could anybody tell me how to prevent an error while entering a text with " ' " (apostrophe) into the SQL table.
Here is my code:
SqlDataSource1.InsertCommand = "INSERT INTO Ptable(pID, title, description, date) VALUES (" + pID + ",'" + TextBox1.Text + "','" + TextBox2.Text + "','" + Convert.ToString(DateTime.Today) + "')";
So, I have a problem, when I'm entering a text like "This's..." into the TextBox1.
Thank you
|
|
|
|
|
You need to double them up - use the string Replace function
Textbox1.Text.Replace("'", "''")
So that "this's" will end up as "this''s"
I sincerely hope you are validating your input Textbox.Text carefully before passing it ot the SQL statement. You might want to read Colin's article:
http://www.codeproject.com/cs/database/SqlInjectionAttacks.asp[^]
|
|
|
|
|
Thanx!!!
|
|
|
|
|
long time did not come back...
for the sql injection issue..i'd suggest to use stored procudures instead of inline sql
<< >>
|
|
|
|
|
enjoycrack wrote: for the sql injection issue..i'd suggest to use stored procudures instead of inline sql
Yes,, also for better performance.
but in case you can't use stored procedures (because you make a dynamic query) you still can use a parameterized query.
|
|
|
|
|
Hello,
I am working on one web base portal and currently requirement is like that need to send SMS to any mobile around the world.
Can anybody help me regarding this.
URL or sample code will be helpful.
Thanks & Regards,
Kumar
|
|
|
|
|
|
there are two column names in my query to extract values.
and four rows corresponding to that query.
now i want to add both the values in the two dimensional array using redim peserve keywords.
i mean at run time i am increasing the length of the array.
i know the process in one dimensioal array.
how should i do that for two D?
-- modified at 8:01 Saturday 21st July, 2007
i am using the following code
Dim datearray(0,0) As String
Dim counter As Integer = 0
While (objDR.Read)
datearray(counter,0) = objDR.Item("wef").ToString
datearray(counter,1) = objDR.Item("abc").ToString
counter += 1
ReDim Preserve datecounter(counter, 0)
ReDim Preserve datecounter(counter, 1)
End While
Sonia Gupta
Soniagupta1@yahoo.co.in
Yahoo messengerId-soniagupta1
Love is Friendship and Friendship is Love....
|
|
|
|