Search

You searched for the word(s): userid:879768

Matching Posts

  • Re: Image Resize Whitespace/Blackspace issue.. weird!

    Hi.... You can resize the image using the following code.. string displayedImghead; //Get the path of the original Image displayedImghead = Server.MapPath("~/Admin/Banner/Thumbnail/") + FUHead.FileName; // Get the path of the Thumb folder string displayedImgThumbhead = Server.MapPath("~/Admin/Banner/"); // Get the original image file name string imgFileNamehead = System.IO.Path.GetFileName(displayedImghead); // Load original image System.Drawing.Image myimghead = System.Drawing
    Posted to System.Drawing/GDI+ (Forum) by si.sharma on 10/9/2009
  • Re: Entities naming convention in N-Tier architecture

    Hi... You can visit the following link..Its good... http://www.dotnetfunda.com/articles/article71.aspx Please mark as ANSWER IF USEFUL... Thanks Kinjal Sharma Infoway
    Posted to Architecture (Forum) by si.sharma on 10/8/2009
  • Re: Resize Images on upload

    Hi... You can use the following code.. try { FileUpload1.SaveAs(Server.MapPath("~/CLogos/") + FileUpload1.FileName); // Get the path of the original Image string displayedImg = Server.MapPath("~/CLogos/") + FileUpload1.FileName; // Get the path of the Thumb folder string displayedImgThumb = Server.MapPath("~/CLogos/Thumbnail/"); // Get the original image file name string imgFileName = System.IO.Path.GetFileName(displayedImg); // Load original image System.Drawing.Image
    Posted to System.Drawing/GDI+ (Forum) by si.sharma on 10/8/2009
  • Re: How to use session variable with immidiate change?

    Hi... Use code like this... TO CREATE THE SESSION VARIABLE.. Session["uname"] = txtEmail.Text; Session["pass"] =txtPass.Text; Response.Redirect("page.aspx"); TO RETRIVE SESSION ON PAGE.ASPX protected void Page_Load (object sender, EventArgs e) { if (Convert.ToString(Session["uname"]) == "" || Convert.ToString(Session["pass"]) == "") { Response.Redirect("Login.aspx"); } else { //YOUR CODE.... } Mark as Answer if useful
    Posted to State Management (Forum) by SI.Sharma on 10/8/2009
  • Re: Mysql database connection string

    Hi.... Try this code....This code is for binding data into gridview from cs file in mysql.. MySqlConnection conn = new MySqlConnection(ConfigurationManager.ConnectionStrings["MyConnectionString"].ConnectionString); sql = "SELECT * from tabel1"; conn.Open(); MySqlCommand cmd = new MySqlCommand(sql, conn); MySqlDataReader dr = cmd.ExecuteReader(); GridView1.DataSource = dr; GridView1.DataBind(); Mark as answer Thanks Kinjal Sharma Infoway
    Posted to MySQL (Forum) by si.sharma on 10/8/2009
  • Re: Create non editable word document using c#.net

    Hi... You can use this code.. string filename= "myfilename.doc"; StreamWriter fp; fp = File.CreateText(Server.MapPath("~/Resumes/") + filename); fp.WriteLine(resume); fp.Close(); this will create word document...Hope it helps..Please mark as answer if its useful.. Thanks Kinjal Sharma Infoway
    Posted to C# (Forum) by si.sharma on 10/8/2009
  • Re: Generate Captcha Image and verification

    Hi.. You can make use the following code... First Put One Label named lblPass string allowedChars = ""; allowedChars = "a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,"; allowedChars += "A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,"; allowedChars += "1,2,3,4,5,6,7,8,9,0,!,@,#,$,%,&,?"; char[] sep ={ ',' }; string[] arr = allowedChars.Split(sep); string passwordString = ""; string temp = ""; Random rand = new Random
    Posted to Web Forms (Forum) by si.sharma on 8/28/2009
  • Re: Creating a word document

    Hi.. You can use the following code.. StreamWriter fp; string data="This is data"; filename= "filename" + ".doc"; fp = File.CreateText(Server.MapPath("~/Foder/") + filename); fp.WriteLine(data); fp.Close(); Simple..Then it will create word file that contains data from data variable..and stores in specified folder.. Remember To Mark As Answer.. Thanks Kinjal(Sharma Infoway)
    Posted to C# (Forum) by si.sharma on 8/28/2009
  • Re: CAPS Lock check in Login Screen

    Hi.. You can use this code. IN ASPX PAGE JAVA SCRIPT : <script language="javascript" type="text/javascript"> function capLock(e) { kc = e.keyCode?e.keyCode:e.which; sk = e.shiftKey?e.shiftKey:((kc == 16)?true:false); if(((kc >= 65 && kc <= 90) && !sk)||((kc >= 97 && kc <= 122) && sk)) document.getElementById('divMayus').style.visibility = 'visible'; else document.getElementById('divMayus').style.visibility
    Posted to Web Forms (Forum) by si.sharma on 8/24/2009
  • Re: to give warning when caps lock on

    Hi.. You can use this java script.. function capLock(e){ kc = e.keyCode?e.keyCode:e.which; sk = e.shiftKey?e.shiftKey:((kc == 16)?true:false); if(((kc >= 65 && kc <= 90) && !sk)||((kc >= 97 && kc <= 122) && sk)) document.getElementById('divMayus').style.visibility = 'visible'; else document.getElementById('divMayus').style.visibility = 'hidden'; } <div id="divMayus" style="visibility:hidden"> <asp
    Posted to Client Side Web Development (Forum) by si.sharma on 8/17/2009
Page 1 of 3 (28 items) 1 2 3 Next >