<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-5140025963896953558</id><updated>2024-08-28T13:48:19.113-07:00</updated><category term="Dyanmic TextBox"/><title type='text'>ASP.Net</title><subtitle type='html'>asp.net programming codes</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://arjunaspnet.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5140025963896953558/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://arjunaspnet.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Arjun Singh Faguda</name><uri>http://www.blogger.com/profile/03067368896675442924</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>4</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5140025963896953558.post-9088404528169748809</id><published>2010-12-14T20:47:00.000-08:00</published><updated>2011-03-14T00:14:28.878-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Dyanmic TextBox"/><title type='text'>Dyanmic TextBox</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; height=&quot;1&quot; src=&quot;http://www.assoc-amazon.com/e/ir?t=arjunsingh2014&amp;amp;l=bil&amp;amp;camp=213689&amp;amp;creative=392969&amp;amp;o=1&amp;amp;a=B000JQU1VS&quot; style=&quot;border: none !important; margin: 0px !important; padding: 0px !important;&quot; width=&quot;1&quot; /&gt;&lt;iframe align=&quot;left&quot; frameborder=&quot;0&quot; marginheight=&quot;0&quot; marginwidth=&quot;0&quot; scrolling=&quot;no&quot; src=&quot;http://rcm.amazon.com/e/cm?t=arjunsingh2014&amp;amp;o=1&amp;amp;p=8&amp;amp;l=bpl&amp;amp;asins=B000JQU1VS&amp;amp;fc1=000000&amp;amp;IS2=1&amp;amp;lt1=_blank&amp;amp;m=amazon&amp;amp;lc1=0000FF&amp;amp;bc1=000000&amp;amp;bg1=FFFFFF&amp;amp;f=ifr&quot; style=&quot;align: left; height: 245px; padding-right: 10px; padding-top: 5px; width: 131px;&quot;&gt;&lt;/iframe&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;img alt=&quot;&quot; border=&quot;0&quot; height=&quot;1&quot; src=&quot;http://www.assoc-amazon.com/e/ir?t=arjunsingh2014&amp;amp;l=bil&amp;amp;camp=213689&amp;amp;creative=392969&amp;amp;o=1&amp;amp;a=B000JQU1VS&quot; style=&quot;border: none !important; margin: 0px !important; padding: 0px !important;&quot; width=&quot;1&quot; /&gt;&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgy1d7p7uWqO6YujIBxDRC0SOdOukRKaDgnaiSUUBzDQsMfLWm2gkM0LQQqNEWy5xcVmuh96PJ31btM6aFgpnpoOe5SeLx0kjvTFvIz8b0oRTsDDcJ7-St0TnT8Dr4_ofemTg6r_OLi7bGj/s1600/Dyanamictxt.JPG&quot; onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; id=&quot;BLOGGER_PHOTO_ID_5550768237926440546&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgy1d7p7uWqO6YujIBxDRC0SOdOukRKaDgnaiSUUBzDQsMfLWm2gkM0LQQqNEWy5xcVmuh96PJ31btM6aFgpnpoOe5SeLx0kjvTFvIz8b0oRTsDDcJ7-St0TnT8Dr4_ofemTg6r_OLi7bGj/s320/Dyanamictxt.JPG&quot; style=&quot;height: 240px; width: 320px;&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgENRoIkVzKUOzyf4xxrRvqJoAGmrwjjhJVeP2Y_PFLMPxsgL6cOBrfgMu_0myXIjoGfaqlpjEspkJqDRDKxJgMm0ISl-6HOKXYPq2ljsmF1YXMgdUo9sd4QPErayoNtsv-GYBLzXLD_ptO/s1600/Dynamicaspx1.JPG&quot; onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot;&gt;&lt;iframe align=&quot;left&quot; frameborder=&quot;0&quot; marginheight=&quot;0&quot; marginwidth=&quot;0&quot; scrolling=&quot;no&quot; src=&quot;http://rcm.amazon.com/e/cm?t=arjunsingh2014&amp;amp;o=1&amp;amp;p=8&amp;amp;l=bpl&amp;amp;asins=B002ZG981E&amp;amp;fc1=000000&amp;amp;IS2=1&amp;amp;lt1=_blank&amp;amp;m=amazon&amp;amp;lc1=0000FF&amp;amp;bc1=000000&amp;amp;bg1=FFFFFF&amp;amp;f=ifr&quot; style=&quot;align: left; height: 245px; padding-right: 10px; padding-top: 5px; width: 131px;&quot;&gt;&lt;/iframe&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; id=&quot;BLOGGER_PHOTO_ID_5550768233366703362&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgENRoIkVzKUOzyf4xxrRvqJoAGmrwjjhJVeP2Y_PFLMPxsgL6cOBrfgMu_0myXIjoGfaqlpjEspkJqDRDKxJgMm0ISl-6HOKXYPq2ljsmF1YXMgdUo9sd4QPErayoNtsv-GYBLzXLD_ptO/s320/Dynamicaspx1.JPG&quot; style=&quot;height: 240px; width: 320px;&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;Aspx.cs&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
using System;&lt;br /&gt;
using System.Configuration;&lt;br /&gt;
using System.Data;&lt;br /&gt;
using System.Web;&lt;br /&gt;
using System.Web.Security;&lt;br /&gt;
using System.Web.UI;&lt;br /&gt;
using System.Web.UI.HtmlControls;&lt;br /&gt;
using System.Web.UI.WebControls;&lt;br /&gt;
using System.Web.UI.WebControls.WebParts;&lt;br /&gt;
&lt;br /&gt;
public partial class Dynamic : System.Web.UI.Page&lt;br /&gt;
{&lt;br /&gt;
static int myCount = 1;&lt;br /&gt;
private TextBox[] dynamicTextBoxes;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
protected void Page_PreInit(object sender, EventArgs e)&lt;br /&gt;
{&lt;br /&gt;
Control myControl = GetPostBackControl(this.Page);&lt;br /&gt;
if (IsPostBack != false)&lt;br /&gt;
{&lt;br /&gt;
if ((myControl != null))&lt;br /&gt;
{&lt;br /&gt;
if ((myControl.ClientID.ToString() == &quot;btnAddTextBox&quot;))&lt;br /&gt;
{&lt;br /&gt;
myCount = myCount + 1;&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
protected override void OnInit(EventArgs e)&lt;br /&gt;
{&lt;br /&gt;
base.OnInit(e);&lt;br /&gt;
dynamicTextBoxes = new TextBox[myCount];&lt;br /&gt;
int i;&lt;br /&gt;
for (i = 0; i &amp;lt; myCount; i += 1)&lt;br /&gt;
{&lt;br /&gt;
TextBox textBox = new TextBox();&lt;br /&gt;
textBox.ID = &quot;myTextBox&quot; + i.ToString();&lt;br /&gt;
MyPlaceHolder.Controls.Add(textBox);&lt;br /&gt;
dynamicTextBoxes[i] = textBox;&lt;br /&gt;
LiteralControl literalBreak = new LiteralControl(&quot;&lt;br /&gt;
&lt;br /&gt;
&quot;);&lt;br /&gt;
MyPlaceHolder.Controls.Add(literalBreak);&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
protected void Page_Load(object sender, EventArgs e)&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
protected void btnAddTextBox_Click(object sender, EventArgs e)&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
protected void MyButton_Click(object sender, EventArgs e)&lt;br /&gt;
{&lt;br /&gt;
MyLabel.Text = &quot;&quot;;&lt;br /&gt;
foreach (TextBox tb in dynamicTextBoxes)&lt;br /&gt;
{&lt;br /&gt;
MyLabel.Text += tb.Text + &quot; :: &quot;;&lt;br /&gt;
} &lt;br /&gt;
}&lt;br /&gt;
public static Control GetPostBackControl(Page thePage)&lt;br /&gt;
{&lt;br /&gt;
Control myControl = null;&lt;br /&gt;
string ctrlName = thePage.Request.Params.Get(&quot;__EVENTTARGET&quot;);&lt;br /&gt;
if (((ctrlName != null) &amp;amp; (ctrlName != string.Empty)))&lt;br /&gt;
{&lt;br /&gt;
myControl = thePage.FindControl(ctrlName);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
foreach (string Item in thePage.Request.Form)&lt;br /&gt;
{&lt;br /&gt;
Control c = thePage.FindControl(Item);&lt;br /&gt;
if (((c) is System.Web.UI.WebControls.Button))&lt;br /&gt;
{&lt;br /&gt;
myControl = c;&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
return myControl;&lt;br /&gt;
} &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: cyan;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;Also see my other blogs:&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;http://arjunasptreeview.blogspot.com/&quot;&gt;TreeView using database&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;a href=&quot;http://arjuneditcommand.blogspot.com/&quot;&gt;Get Primary key of gridview on edit commant&lt;/a&gt;&lt;/b&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://arjunaspnet.blogspot.com/feeds/9088404528169748809/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://arjunaspnet.blogspot.com/2010/12/dyanmic-textbox.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5140025963896953558/posts/default/9088404528169748809'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5140025963896953558/posts/default/9088404528169748809'/><link rel='alternate' type='text/html' href='http://arjunaspnet.blogspot.com/2010/12/dyanmic-textbox.html' title='Dyanmic TextBox'/><author><name>Arjun Singh Faguda</name><uri>http://www.blogger.com/profile/03067368896675442924</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgy1d7p7uWqO6YujIBxDRC0SOdOukRKaDgnaiSUUBzDQsMfLWm2gkM0LQQqNEWy5xcVmuh96PJ31btM6aFgpnpoOe5SeLx0kjvTFvIz8b0oRTsDDcJ7-St0TnT8Dr4_ofemTg6r_OLi7bGj/s72-c/Dyanamictxt.JPG" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5140025963896953558.post-3707383871625852107</id><published>2010-11-15T22:57:00.000-08:00</published><updated>2011-03-14T00:15:06.184-07:00</updated><title type='text'>Reset table id&#39;s &quot;O&quot;</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;use &lt;db_name&gt;&lt;br /&gt;
&lt;br /&gt;
DECLARE @reset_id varchar(200)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
DECLARE reset_cursor CURSOR FOR&lt;br /&gt;
&lt;br /&gt;
select Table_schema+&#39;.&#39;+Table_Name as tname from information_schema.tables&lt;br /&gt;
&lt;br /&gt;
where Table_Type=&#39;BASE TABLE&#39;&lt;br /&gt;
&lt;br /&gt;
OPEN reset_cursor;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
FETCH NEXT FROM reset_cursor&lt;br /&gt;
&lt;br /&gt;
INTO @reset_id;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
WHILE @@FETCH_STATUS = 0&lt;br /&gt;
&lt;br /&gt;
BEGIN&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
DBCC CHECKIDENT(@reset_id,RESEED,0)&lt;br /&gt;
&lt;br /&gt;
print @reset_id;&lt;br /&gt;
&lt;br /&gt;
FETCH NEXT FROM reset_cursor INTO @reset_id;&lt;br /&gt;
&lt;br /&gt;
END;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
CLOSE reset_cursor;&lt;br /&gt;
&lt;br /&gt;
DEALLOCATE reset_cursor;&lt;/db_name&gt;&lt;br /&gt;
&lt;db_name&gt;&lt;br /&gt;
&lt;/db_name&gt;&lt;br /&gt;
&lt;db_name&gt;&lt;br /&gt;
&lt;/db_name&gt;&lt;br /&gt;
&lt;db_name&gt;&lt;/db_name&gt;&lt;br /&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: cyan;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;Also see my other blogs:&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;http://arjunasptreeview.blogspot.com/&quot;&gt;TreeView using database&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;a href=&quot;http://arjuneditcommand.blogspot.com/&quot;&gt;Get Primary key of gridview on edit commant&lt;/a&gt;&lt;/b&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://arjunaspnet.blogspot.com/feeds/3707383871625852107/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://arjunaspnet.blogspot.com/2010/11/reset-tabel-ids-o.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5140025963896953558/posts/default/3707383871625852107'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5140025963896953558/posts/default/3707383871625852107'/><link rel='alternate' type='text/html' href='http://arjunaspnet.blogspot.com/2010/11/reset-tabel-ids-o.html' title='Reset table id&#39;s &quot;O&quot;'/><author><name>Arjun Singh Faguda</name><uri>http://www.blogger.com/profile/03067368896675442924</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5140025963896953558.post-7473815904373580581</id><published>2010-11-15T22:55:00.000-08:00</published><updated>2010-11-15T22:56:57.127-08:00</updated><title type='text'></title><content type='html'>use &lt;db_name&gt;&lt;br /&gt;&lt;br /&gt;DECLARE @reset_id varchar(200)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;DECLARE reset_cursor CURSOR FOR&lt;br /&gt;&lt;br /&gt;select Table_schema+&#39;.&#39;+Table_Name as tname from information_schema.tables&lt;br /&gt;&lt;br /&gt;where Table_Type=&#39;BASE TABLE&#39;&lt;br /&gt;&lt;br /&gt;OPEN reset_cursor;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;FETCH NEXT FROM reset_cursor&lt;br /&gt;&lt;br /&gt;INTO @reset_id;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;WHILE @@FETCH_STATUS = 0&lt;br /&gt;&lt;br /&gt;BEGIN&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;DBCC CHECKIDENT(@reset_id,RESEED,0)&lt;br /&gt;&lt;br /&gt;print @reset_id;&lt;br /&gt;&lt;br /&gt;FETCH NEXT FROM reset_cursor INTO @reset_id;&lt;br /&gt;&lt;br /&gt;END;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;CLOSE reset_cursor;&lt;br /&gt;&lt;br /&gt;DEALLOCATE reset_cursor;</content><link rel='replies' type='application/atom+xml' href='http://arjunaspnet.blogspot.com/feeds/7473815904373580581/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://arjunaspnet.blogspot.com/2010/11/use-declare-resetid-varchar200-declare.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5140025963896953558/posts/default/7473815904373580581'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5140025963896953558/posts/default/7473815904373580581'/><link rel='alternate' type='text/html' href='http://arjunaspnet.blogspot.com/2010/11/use-declare-resetid-varchar200-declare.html' title=''/><author><name>Arjun Singh Faguda</name><uri>http://www.blogger.com/profile/03067368896675442924</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5140025963896953558.post-6837453015961683747</id><published>2010-11-15T22:39:00.000-08:00</published><updated>2011-03-14T00:15:44.293-07:00</updated><title type='text'>Upload Image File in defined Folder</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div&gt;if (ImageFileUpload.HasFile)&lt;/div&gt;&lt;div&gt;{&lt;/div&gt;&lt;div&gt;try&lt;/div&gt;&lt;div&gt;{&lt;/div&gt;&lt;div&gt;if (ImageFileUpload.PostedFile.ContentType == &quot;image/jpeg&quot;)&lt;/div&gt;&lt;div&gt;{&lt;/div&gt;&lt;div&gt;if (ImageFileUpload.PostedFile.ContentLength &amp;lt;&amp;gt;&lt;br /&gt;
&lt;div&gt;{&lt;/div&gt;&lt;div&gt;string filename = Path.GetFileName(ImageFileUpload.FileName);&lt;/div&gt;&lt;div&gt;ImageFileUpload.SaveAs(Server.MapPath(&quot;~//Images/&quot;)+ filename);&lt;/div&gt;&lt;div&gt;UploadErrorlbl.Text = &quot;File Uploaded&quot;;&lt;/div&gt;&lt;div&gt;LblFilePath.Text = ImageFileUpload.PostedFile.FileName;&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;div&gt;else&lt;/div&gt;&lt;div&gt;UploadErrorlbl.Text = &quot;Upload status: Only JPEG files are accepted!&quot;;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;div&gt;catch (Exception ex)&lt;/div&gt;&lt;div&gt;{&lt;/div&gt;&lt;div&gt;UploadErrorlbl.Text = &quot;Upload status: The file could not be uploaded. The following error occured: &quot; + ex.Message;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;div&gt;}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: cyan;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;Also see my other blogs:&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;http://arjunasptreeview.blogspot.com/&quot;&gt;TreeView using database&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;a href=&quot;http://arjuneditcommand.blogspot.com/&quot;&gt;Get Primary key of gridview on edit commant&lt;/a&gt;&lt;/b&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://arjunaspnet.blogspot.com/feeds/6837453015961683747/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://arjunaspnet.blogspot.com/2010/11/upload-image-file-in-defined-folder.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5140025963896953558/posts/default/6837453015961683747'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5140025963896953558/posts/default/6837453015961683747'/><link rel='alternate' type='text/html' href='http://arjunaspnet.blogspot.com/2010/11/upload-image-file-in-defined-folder.html' title='Upload Image File in defined Folder'/><author><name>Arjun Singh Faguda</name><uri>http://www.blogger.com/profile/03067368896675442924</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>