Processing of Files

Source: Internet
Author: User

<Marquee direction = "up" style = "width: 157px">
<Asp: repeater runat = "server" id = "shownamelist">
<Itemtemplate>
<% # Databinder. eval (container. dataitem, "nickname") %> "check if your book has been published." <br/>
</Itemtemplate>
</ASP: repeater> </marquee>

Datatable newdt = new datatable ("carttable ");
DS. Tables. Add (newdt );
Datacolumn newdc;
Newdc = new datacolumn ("Product ID", system. type. GetType ("system. int32 "));
DS. Tables ["carttable"]. Columns. Add (newdc );
Newdc = new datacolumn ("Product Name", system. type. GetType ("system. String "));
DS. Tables ["carttable"]. Columns. Add (newdc );
Newdc = new datacolumn ("item quantity", system. type. GetType ("system. int32 "));
Newdc. defaultvalue = 1;
DS. Tables ["carttable"]. Columns. Add (newdc );
Newdc = new datacolumn ("unit price", system. type. GetType ("system. Double "));
DS. Tables ["carttable"]. Columns. Add (newdc );
Newdc = new datacolumn ("subtotal", system. type. GetType ("system. Double "));
DS. Tables ["carttable"]. Columns. Add (newdc );
Session ["yourcarttable"] = newdt;

String strrnd = ""; // random number string
Random RND = new random (); // defines the class that generates random numbers.
Strrnd = RND. Next (1000,999 9). tostring (); // generate a random number

Newrow ["filecreater"] = C. filecreater;
Newrow ["lastupdateperson"] = C. lastupdateperson;
If (txtkeyword. Text = "")
{Newrow ["keyword"] = "NONE ";}
Else {newrow ["keyword"] = txtkeyword. Text ;}
If (txtdiscription. Text = "")
{Newrow ["filediscription"] = "NONE ";}

Int I = filefullnamefrom. lastindexof ("\\");
String dirurlfrom = filefullnamefrom. substring (0, I); // path

Directoryinfo di = new directoryinfo (@ "D: \ file management system V1 ");
C. directoryurl = @ "D: \ file management system V1" + "\" + C. fatherdirectory;
Directoryinfo Dis = new directoryinfo (C. directoryurl );
If (! Dis. exists)
{
Di. createsubdirectory (C. fatherdirectory );

<Form ID = "form1" runat = "server" enctype = "multipart/form-Data">
<Input id = "file1" type = "file" runat = "server"/> </TD>
String filefullnamefrom = file1.postedfile. filename; // contains the path name.

String wanttosave = file1.postedfile. filename;
Int I = wanttosave. lastindexof ("\\");
String wanttouploadfoldpathfrom = wanttosave. substring (0, I); // path of the folder to be uploaded from
String foldnamefrom = "";
Try
{
Char [] spliter = {'\\'};
String [] filename = file1.postedfile. filename. Split (spliter, 10 );
Foldnamefrom = filename [filename. Length-2];
}
Catch
{
Return;
}
<System. Web>
<Globalization
Requestencoding = "gb2312"
Responseencoding = "gb2312"
/>
<Httpruntime maxrequestlength = "2048576" usefullyqualifiedredirecturl = "true" executiontimeout = "3600"/>
</System. Web>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.