|
suppose ur file is located at c:\ with name 'rashida.txt'
u want to rename this file to 'rashida-1.txt'
then use
Directory.Move("C:\rashida.txt", "C:\rashida-1.txt");
this will rename ur file
thought it'll cut ur file and paste there with different name but u can rename the file in this way
|
|
|
|
|
Use System.IO.Directory.Move
System.IO.Directory.Move("oldFolder","newFolder")
|
|
|
|
|
Hi all
I my asp .net web application (vb .net as code behind) i've used sql server as back end..
I want to know that is it possible to store an output of the sql command without/with using any controls..
My code snippet is,
cmd = New SqlCommand("SELECT Sum(prod_qty) as Quantity FROM bill_main_proddetails WHERE bill_date >= '2006/10/01' AND bill_date <= '2006/11/30' and prod_id='P0007'", cn)
I need the output of the command in a variable
Thanks in advance
|
|
|
|
|
You need to use DataReader or Dataset for this
Mubashir
Every job is a self portrait of the person who did it.
|
|
|
|
|
string templateno=Session["templateid"].ToString();
txttemplate.Text = templateno;
cmd = new SqlCommand("select price from template_master where templateid='" + templateno + "'", conn);
conn.Open();
string price = cmd.ExecuteScalar().ToString();
conn.Close();
use ExecuteScalar to execute single row
Deepak
Smile a Lots,Its Costs Nothing
|
|
|
|
|
How can update home page (photos or contents)in run time
|
|
|
|
|
How can I implement formatting tools in a webpage using asp.net
|
|
|
|
|
hello technicals
i m ajay.
i have a problem related to asp.net debugging.
when i m running my project,i left with "error while trying to run the project:unable to start debugging on web server.The project is not configured to be debugged."
i have tried the microsoft article "306156".But it does not solve my problem.
i have the web.config file in which debug is true.
i m also the member of debugger users group.
although i login frm administrator and chk it.
then also i m getting the same error.
wht could be the reason.
plz help.....
thanks in advance
|
|
|
|
|
create the virtual directory of the project in IIS
hope this wud resolve ur problem
|
|
|
|
|
i have already set the virtual directory for my project.......
still the same error.
|
|
|
|
|
Hi All
I want to add one colorpicker/colorcontrol on my asp.net page.Is it possible or not? If possible then How is it possible?
Thanks
monika
|
|
|
|
|
Yes it's possible but i can not enter code.
Pls send me your mail id--
g_parwez@rediffmail.com
Keep Smiling !!! Tomorrow Never Die
Parwej Ahamad
g_parwez@rediffmail.com
|
|
|
|
|
Hi Monika,
This is possible through javascript. Just you search for javascript colorpicker. Sure you find the solution. view this site.. may be it is useful for you.
http://www.free-color-picker.com/
http://www.free-color-picker.com/downloads.php
|
|
|
|
|
How to add a "TAB" white space into string ?
Best regards,
Chee ken
|
|
|
|
|
Use the escape code for the tab character; "\t":
string s = "Here\tare\tsome\t\t\t\ttab\tcharacters.";
---
b { font-weight: normal; }
|
|
|
|
|
Why my output include the '\t' , for example , it display the whole Here\tare\tsome\t\t\t\ttab\tcharacters on the screen.
Best regards,
Chee ken
|
|
|
|
|
since \ is a special character hence use \\t for one tab.
SAMir Nigam
|
|
|
|
|
The confusion may come from the fact that this is a language specific question that you didn't post in a language specific forum.
What programming language are you using?
---
b { font-weight: normal; }
|
|
|
|
|
asp.net (VB)
Best regards,
Chee ken
|
|
|
|
|
ASP.NET is not a programming language, it's a platform, so the language would be VB.NET.
VB doesn't use escape sequences in strings, so you have to use the Chr method to add tab characters:
Dim s As String<br />
s = "here" & Chr(9) & "are" & Chr(9) & "some" & Chr(9) & Chr(9) & Chr(9) & Chr(9) & "tab" & Chr(9) & "characters"
---
b { font-weight: normal; }
|
|
|
|
|
Hii all,
i am confused in which board i have to ask this.. it's related to some logic problem.
i am using asp.net and oracle database.
i need help to write a sql to check the existed data is matching with the input data.. the problem i am facing is i have a amount filed, which is having different values to each slab setting.
ex:
slab 1: 1-1000 the amount is 20
slab 2: 1000-2000 the amount is 25..
like this.
my problem is restricting user to enter the valid rage only. how do i check the the rage specified is existed in the database. user should not enter in between on range also..
what i mean is suppose if ihave already 1-1000 slab then i should not allow user to enter 500- 1000 again..
I'm trying with slabfrom >= and slabto<= which is not giving what i require..
can any body suggest how to do this??
thanks..
Smile..
|
|
|
|
|
I guess you need a custom validator, which uses data from the database to validate entry.
Christian Graus - C++ MVP
|
|
|
|
|
Thank you for ur response mr. Chirstian graus. i donot know how to create custom validator.. abd i d't have time to R&D. if you can suggest me how can i do it other way..
this is the sql code i am using
sqlstr = "Select SLABFROM, SLABTO from SLABLIST " _
& " where USERID='" & GlobalVars.SessionUser & "' and (slabfrom>=" & slbfr & " and slabto<=" & slbto & ")"
which is in for loop for the grid items.
Pls. give me some sort of solution..
Thanking you.
|
|
|
|
|
A custom validator is not R&D, it's a basic control provided by the framework. You create code in the code behind to set if the validator is valid, it can make a DB call and check if the value being passed in is valid, based on what's in the DB.
Someone gave you a 1, presumably because you're asking me to do your job. It wasn't me, but really, if you don't know how to do this stuff, and you don't have the time to learn, then either you shouldn't be doing the project, or your schedule is unreasonable.
Christian Graus - C++ MVP
|
|
|
|
|
Hello,
I have an assembly with customs controls, classes and handlers.I am creating it as an ASP.NET 2.0 VS2005 Web Project
This one one of my handlers:
Namespace Web
Public Class SiteMap : Implements IHttpHandler
Public Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler.ProcessRequest
Dim xslDoc As XslCompiledTransform = New XslCompiledTransform
xslDoc.Load(Page.ClientScript.GetWebResourceUrl(Me.GetType, "MyProjectNamespace.Web.SiteMap.xsl")) >>> ERROR
End Sub
...
I get the error "Page is not declared".
I also have the code line "<Assembly: System.Web.UI.WebResource("MyProjectNamespace.Web.SiteMap.xsl", "text/xml")> " in my AssemblyInfo.vb file.
And I set the Build Action of "SiteMap.xsl" to "Embedded Resource".
I have been reading documentation in internet but I can't find the solution.
Could someone help me out?
Thank You,
Miguel
|
|
|
|