|
The short answer is that you use String Builder when you are doing operations on a string, such as concatenation. It's optimized for those operations more than strings.
|
|
|
|
|
Hi All
I have one problem in asp.net.I am adding everytime new column in datagrid in asp.net.I got Column index as &HE.But i want 14 instead of &HE.How to convert E to 14.What i do?Pls help me.
Thanx
monika
|
|
|
|
|
Use the function ‘Cint’. CInt("&HE") will return the value 14.
Thomas
|
|
|
|
|
I am designing a web page where I am showing data in a datagrid selecting table names from a dropdownlist.The datagrid is editable.
I am not finding any way to update the data in database.
Kaustav Guha
|
|
|
|
|
i have a calculated data, for example, 14.429424242344, but i only need the rounded two digit only, how to do it using asp.net ?
for example, calculate data : 14.429424242344
data i need to store : 14.43
how to do it ?
Best regards,
Chee ken
|
|
|
|
|
Hi there
FormatNumber(YourNumber,[number Of digits after decimal],[include leading digit as Tristate],[use parens for negative numbers as Tristate],[group digits as Tristate])
This is the function and as for the parameters
1)ur number
2)2 //because u want to display 2 digits after decimal
u can define the rest as u need or keep them "default"
Best Regards
3ala2
|
|
|
|
|
MATH.ROUND (3.1786436,2) = 3.17
MATH.CEILING (3.1786436,2) = 3.18
|
|
|
|
|
Thanks for your help, The function can run already !!
Best regards,
Chee ken
|
|
|
|
|
Hi
i am trying to add data in tree view control from database, I have folders and documents & sub folders in those folders. so i want to show hierarchy of folders in treeview.
my code is as under Here I have table called folder and in this table unique key is ID and parent key is ParentFolderID which reference to Id of the same table so if there are sub folders then ParentFolderId will be parent Folder's ID. So if there is table which is root level then its ParentFolderID will be reference to itself.
Try
RootFolderStr = "Select Name from Folder where ID=ParentFolderID"
dr = temp.ExecuteDataReader(RootFolderStr)
While dr.Read
Root = dr("Name")
tNode.Text = Root
Tree1.Nodes.Add(tNode)
End While
Catch ex As Exception
MsgBox(ex.Message)
Finally
dr.Close()
End Try
when i am adding one item it works fine but if there are more items then it returns error
"Index must be within the bounds of the List.Parameter name: index"
So please help if any one knows the answer.
Thanks in advance
|
|
|
|
|
Include Microsoft.Web.UI.WebControls.dll in your project.
For runtime addition of nodes for TreeView control do following steps
//On aspx page register TreeView as
<%@ Page language="c#" Codebehind="TreeControl.aspx.cs" AutoEventWireup="false" Inherits="UserControlApplication.TreeControl" %>
//Treeview Control
//Add the root node for User Control Tree1 in .cs file
TreeNode tNode = new TreeNode();
tNode.Text="Root";
tree1.Nodes.Add(tNode);
//Add Child Node to root node tNode
TreeNode tChileNode1 = new TreeNode();
tChileNode1.Text = str;//This string is the information retrieved form database
tNode.Nodes.Add(tChileNode1);
#Abhi#
|
|
|
|
|
hi abhi
i have try this but it will work when i have only one row.
if there are more rows that i m fetching then error is coming that i have asked in my previous question
so if there is another way to solve it please let me know
Thanks
|
|
|
|
|
Hi
Try this -
Define your chile node inside while loop and fill it and after it add to root node.
:->:->:->
#Abhi#
|
|
|
|
|
Learn how to develop your next ASP.NET2.0 application using Provider Model.
If you are interested, you can download a copy (PDF) from below URL:
http://www.agdstudio.com[^]
|
|
|
|
|
I need to add a "ENTER" whitespace into string, so when i display the string into control, the string will be continue display on next row.
How to add this "ENTER" ?
for example;
dim str as string = "A ENTER B"
so the output will be :
A
B
Best regards,
Chee ken
|
|
|
|
|
Use Environmend.NewLine:
Dim str As String = "A" + Environment.NewLine + "B"
Then of course it depends on if the control handles line breaks in the text or not.
---
b { font-weight: normal; }
|
|
|
|
|
Dim str As String = "A" + <-br-> + "B"
plz remove "-" side of the "-br-"
hi
hope can work.
-- modified at 8:10 Monday 30th October, 2006
|
|
|
|
|
|
The function can run already , thanks for your help !!
Best regards,
Chee ken
|
|
|
|
|
Hi,
I know I can specify an SMTP server in the web.config file in ASP.NET 2.0 like this
<system.net>
<mailSettings>
<smtp deliveryMethod="Network">
<network host="mail.domain.com" port="25" userName="username" password="password" />
</smtp>
</mailSettings>
</system.net>
My question is it possible to set multiple SMTP servers and programmatically select which one I want to use? I may want to send mail from different addresses for instance and my mail server requires my username to be username@domain.com, so if I wanted to send mail from different addresses I would need to set the web.config file like so...
<system.net>
<mailSettings>
<smtp deliveryMethod="Network">
<network host="mail.domain.com" port="25" userName="email1@domain.com" password="password1" />
</smtp>
<smtp deliveryMethod="Network">
<network host="mail.domain.com" port="25" userName="email2@domain.com" password="password2" />
</smtp>
</mailSettings>
</system.net>
Thing is it won't let me do this because the <smtp> element can't be repeated. Any ideas? Cheers!
Sunday Ironfoot
|
|
|
|
|
hai every one
im using sesson event.in gridview i have a checkbox.if i check that the bounded data stored in the sesson.so how can i store for multiple data in sesson.plz any one help me
Dhatchinamoorthy.R
9894824838
|
|
|
|
|
hi guys
i have question about how to update, save and retrieve the appsettings and connectionsettings on the web.config file in asp.net 2.0 C#?
thanks
|
|
|
|
|
Check function configuration.appsettings(<userkey>)
Regards,
Akhilesh Yadav
|
|
|
|
|
How can i Call Postback ()
For example i have a button in my page i want when button click Page_load Functoin call ( AFTER Click event Of Button is raised and doned )
With Thanks
MHF
|
|
|
|
|
That is not possible. Page_Load is always executed before control events. If it weren't, controls created in Page_Load could not have events.
You can use Page_PreRender for anything that you want to do after control events.
---
b { font-weight: normal; }
|
|
|
|
|
hi
I am developing one network monitoring tool Which contain table..
I want to insert grid veiw in one row i.e in <asp:tablecell>.
but problem is once i put that gridview control in <asp:tablecell>
it disappear that whole column.
(I am developing the tool just like computer managment application.
You can see this on your own computer.
1. write click it on My computer.
2. Manage
)
so how can i use this control???
eg:
<asp:TableCell Width="70%" BorderWidth="3" Height="100%">
<asp:GridView ID="GridView1" runat="server">
</asp:GridView>
</asp:TableCell>
I am waiting for ur reply..
|
|
|
|