ASPForums.Net RSS Feed additions to the content that appears on ASPForums.Net(c) 2017 All rights reserved.Zoom (Enlarge) image on MouseOver in ASP.Net Repeater using jQuery<p>Hi sir ,</p> <p>i am refering the link&nbsp;</p> <p><a href=""></a></p> <p>can u help with repeater control for this.</p> <p>Thanks</p>, 01 Jun 2015 22:47:57 GMTZip image files stored in database and download in ASP.Net<p>I have images saved in database, now I want to this images fetch from database and save into zipfile and return to the user for download in mvc4? How do that functionality.</p>, 08 Jan 2015 06:57:53 GMTWrite data to Excel file (.xls and .xlsx) with Master Pages in ASP.Net <p>&nbsp;</p> <pre class="brush: html">hi Mudassar Sir, I am learning programming. I was very much fond of Your Help in this forum. Sir, I have following problem: I am referring to your example in below url: the code works good when my webform is not inside content place holder of Master page. but, when i use same code in the webform which lies inside content place holder of a Master page, downloading of excel doesnot happen. I dont know why. Sir kindly Help....</pre> <p>&nbsp;</p> <p>&nbsp;</p> <p>&nbsp;</p> <p>&nbsp;</p> <p>&nbsp;</p>, 22 Sep 2015 11:17:22 GMTWrap long text in GridView Column in ASP.Net<p>any idea how to wrap the column of a gridiew?</p>, 07 Oct 2014 03:02:40 GMTWhy GridView not showing record in ASP.Net<p>hello all ,</p> <p>i have a botton , and the code behind it as below :</p> <p>&nbsp;</p> <pre class="brush: csharp">protected void btnView_Click(object sender, EventArgs e) { SqlDataAdapter sda = new SqlDataAdapter(&#34;Select * from tblMain&#34;, conn); DataTable dt = new DataTable(); sda.Fill(dt); gv2.DataSource = dt; conn.Close(); }</pre> <p>&nbsp;</p> <p>when i run the web page and click the btnview .. the page is still empty ?!!</p> <p>why is that&nbsp;</p> <p>&nbsp;</p> <p>the other question is :</p> <p>if i want to refresh the data of the gv2, automatically after ading data to it how to do it ?</p> <p>&nbsp;</p> <p>regards</p> <p>&nbsp;</p>, 29 Nov 2016 02:12:13 GMTWhy GridView is preferred over Crystal Reports for Reporting in ASP.Net<p>sir why we are mostly use gridview&nbsp; not prefer crystal report for displaying report</p>, 12 Dec 2012 04:04:30 GMTXmlDataSource filtering and Binding Issue<pre class="brush: xml">&lt;%@ Page Language=&#34;C#&#34; AutoEventWireup=&#34;true&#34; CodeBehind=&#34;WebForm8.aspx.cs&#34; Inherits=&#34;WebApplication5.NewFolder4.WebForm8&#34; %&gt; &lt;!DOCTYPE html PUBLIC &#34;-//W3C//DTD XHTML 1.0 Transitional//EN&#34; &#34;;&gt; &lt;html xmlns=&#34;;&gt; &lt;head runat=&#34;server&#34;&gt; &lt;title&gt;&lt;/title&gt; &lt;/head&gt; &lt;body&gt; &lt;form id=&#34;form1&#34; runat=&#34;server&#34;&gt; &lt;div&gt; &lt;asp:XmlDataSource ID=&#34;XmlDataSource1&#34; runat=&#34;server&#34;&gt; &lt;Data&gt; &lt;employeeinformationbyday&gt; &lt;emp id=&#34;100&#34; empname=&#34;Samanta&#34; genid=&#34;1&#34; OfficeTime=&#34;today&#34; /&gt; &lt;emp id=&#34;200&#34; empname=&#34;Lusia&#34; genid=&#34;11&#34; OfficeTime=&#34;yesterday&#34; /&gt; &lt;emp id=&#34;200&#34; empname=&#34;Andria&#34; genid=&#34;100&#34; OfficeTime=&#34;today&#34; /&gt; &lt;/employeeinformationbyday&gt; &lt;/Data&gt; &lt;/asp:XmlDataSource&gt; &lt;asp:GridView ID=&#34;GridView1&#34; runat=&#34;server&#34; AutoGenerateColumns=&#34;false&#34;&gt; &lt;Columns&gt; &lt;asp:TemplateField HeaderText=&#34;empname&#34;&gt; &lt;ItemTemplate&gt; &lt;asp:Label ID=&#34;Label1&#34; runat=&#34;server&#34; Text=&#39;&lt;%# Eval(&#34;empname&#34;) %&gt;&#39;&gt;&lt;/asp:Label&gt; &lt;/ItemTemplate&gt; &lt;/asp:TemplateField&gt; &lt;/Columns&gt; &lt;/asp:GridView&gt; &lt;/div&gt; &lt;/form&gt; &lt;/body&gt; &lt;/html&gt; </pre> <p>&nbsp;</p> <p>&nbsp;</p> <p>&nbsp;</p> <p>*** You can chnage your Gridview style as you need&nbsp;</p> <p>&nbsp;</p> <p>Bind empname only from the XmlDataSource to GridView where Officetime="today"</p> <p>&nbsp;</p> <p><span style="text-decoration: underline;">Output :</span></p> <p>Samanta</p> <p><span>Andria</span></p> <div><span><br /></span></div> <div><span style="text-decoration: underline;">output to next line, please use "\n"&nbsp;</span></div> <div><span><br /></span></div> <div><span><br /></span></div> <div><span style="text-decoration: underline;">Please <strong>do not use</strong> LINQ, Generics and XML</span></div> <div><span><span><br /></span></span></div> <div><span><span><br /></span></span></div> <div><span style="text-decoration: underline;"><strong>You can use&nbsp;</strong>Collections and WebControls, HtmlControls&nbsp;</span></div> <div><span style="text-decoration: underline;"><br /></span></div> <div><span style="text-decoration: underline;"><br /></span></div> <div>The code may be look like this</div> <div>&nbsp;</div> <div>&nbsp;</div> <pre class="brush: csharp">protected void Page_Load(object sender, EventArgs e) { XmlDocument myXml = new XmlDocument(); myXml = (XmlDocument)XmlDataSource1.GetXmlDocument(); XmlReader xtr = new XmlNodeReader(myXml); DataSet ds = new DataSet(); DataTable dt = new DataTable(); DataRow[] dr; DataTable dtfilter = new DataTable(); //Here i load all xml data in to dataset ds.ReadXml(xtr); dt = ds.Tables[0]; //Filter here above employe no ten records dr = dt.Select(&#34;OfficeTime = &#39;Today&#39;&#34;); dtfilter = dr.CopyToDataTable(); GridView1.DataSource = dtfilter; GridView1.DataBind(); }</pre> <p>&nbsp;</p>, 08 Sep 2013 11:26:34 GMTWhile binding datalist how to bind in next row based on condition<p>I am using Datalist to bind userdetails which contains department name. With RepeatColumns="2" &amp; RepeatDirection=" Horizontal". Now i want to check a condition while binding.</p> <p>for Example; If i am binding with 5 users having 3 users with same department and remaining 2 users with different departments then i want to show 1st 3 users having same department in two rows and remaining to users in next two rows.</p> <p>Can anyone help on this?</p> <pre class="brush: html">&lt;asp:DataList ID=&#34;dlHaysContacts&#34; runat=&#34;server&#34; RepeatColumns=&#34;2&#34; RepeatDirection=&#34; Horizontal&#34;&gt; &lt;ItemTemplate&gt; &lt;div class=&#34;dlSettings&#34;&gt; &lt;div&gt; &lt;asp:LinkButton ID=&#34;lnkHaysContactName&#34; runat=&#34;server&#34; Text=&#39;&lt;%# Eval(&#34;HaysContactName&#34;) %&gt;&#39; OnClientClick=&#39;&lt;%# String.Format(&#34;EmailToServiceTeam(\&#34;{0}\&#34;);&#34;, Eval(&#34;hays_contact_email&#34;)) %&gt;&#39;&gt;&lt;/asp:LinkButton&gt; &lt;/div&gt; &lt;div&gt; &lt;asp:Label Style=&#34;text-align: justify&#34; ID=&#34;lblServiceArea&#34; runat=&#34;server&#34; Text=&#39;&lt;%# Eval(&#34;department_name&#34;) %&gt;&#39;&gt;&lt;/asp:Label&gt; &lt;/div&gt; &lt;div&gt; &lt;asp:Label Style=&#34;text-align: justify&#34; ID=&#34;lblRole&#34; runat=&#34;server&#34; Text=&#39;&lt;%# Eval(&#34;hays_contact_title&#34;) %&gt;&#39;&gt;&lt;/asp:Label&gt; &lt;/div&gt; &lt;div&gt; &lt;b&gt;p: &lt;/b&gt; &lt;asp:Label ID=&#34;lblPhone&#34; runat=&#34;server&#34; Text=&#39;&lt;%# Eval(&#34;hays_contact_phone&#34;) %&gt;&#39;&gt;&lt;/asp:Label&gt; &lt;/div&gt; &lt;/div&gt; &lt;/ItemTemplate&gt; &lt;/asp:DataList&gt;</pre>, 18 Mar 2016 08:37:00 GMTWhich is better option to store files in File System (Disk) or Database in ASP.Net<p>I am working on a journal website where user submit manuscripts , pdf files , is it good idea to store pdf files on directory or on database.</p> <p>&nbsp;</p> <p>Thanks.</p>, 29 Aug 2013 01:39:49 GMTWhich control out of GridView, Repeater, DataList is visible even if no data (empty) in ASP.Net<p>Which control can be viewed if the datas are in empty also?</p>, 18 Sep 2014 05:10:46 GMTWhere to store large files (in Database or in folder)<p>Hello,</p> <p>I am curious to know the following:</p> <p>We are going to develop a website where we need to store large number of files. The file size may be uptp 50 MB. What approach should we follow:</p> <p>1) We should store files in Database</p> <p>2) We should have a directory and store all the files in that</p> <p>3) We should hire a SAN Storage and use this seperate location to store the files.</p> <p>Please suggest.</p> <p>&nbsp;</p> <p>&nbsp;</p>, 08 Apr 2013 23:40:40 GMTWhen to ise ASP.Net ListView OnItemCreated Event<p>can anyone explain when onitemcreated event should be used in listview&nbsp;</p>, 27 Aug 2012 01:52:03 GMTWhen applying Scrollable Gridview the headers does not match with TemplateField<p>Sir,</p> <p>&nbsp;&nbsp;&nbsp; I used the link below</p> <p></p> <p>I have nearly 25 columns in my Gridview so when i apply the scrollable grdview the header does not align with template field.</p> <p>Thanks in advance</p>, 21 Feb 2013 22:42:24 GMTWhat is the use of Connection Open method in ADO.Net<p>we usually open a connection by and close the connection by con.close().when we create a method like,</p> <p>public void conopen()</p> <p>{</p> <p>if(</p> <p>;</p> <p>con.close();</p> <p>}</p> <p>what is basically the use of this method..??...why we create this method when we have and con.close();</p>, 05 Jul 2013 02:01:47 GMTwhat is solution to bind fileupload control wit session value<p><em>FileUpload1 = (FileUpload) Session["fileLocation"];</em>&nbsp;&nbsp;&nbsp;<strong>not working</strong></p> <p>FileUpload1.SaveAs(Server.MapPath("UploadDoc................)</p> <p>&nbsp;</p> <p>if not then please suggest how can i do with other way</p> <p>&nbsp;</p> <p>&nbsp;</p> <p>&nbsp;</p>, 22 Jul 2017 12:20:32 GMTWhat is ASP.Net GridView OnRowDataBound Event when it is used and how<p>What is GridView Event "RowDataBound" ?</p> <p>When it is used ? And How ?</p> <p>Please explain it Briefly with some exaple..</p>, 06 Jun 2013 01:44:46 GMTWhat does Eval statement mean in controls like GridView Repeater DataList in ASP.Net<p>&lt;asp:Label ID="lblsize" runat="server" Text='&lt;%# Eval("size")%&gt;' /&gt;</p> <p>&nbsp;</p> <p>in the syntax above, what is<strong> '&lt;%# Eval("size")%&gt;'</strong> means? thanx in advance..</p>, 22 Aug 2013 02:39:57 GMTWhat are all the methods to call controller from view in ASP.NET MVC<p>Please send me the answer..</p> <p>please list out all the methods.</p>, 08 Jun 2016 07:03:05 GMTWeek wise Grid: Display days of week in Repeater / GridView in ASP.Net<p>How to show current date along with six days as a week in html header with navigation bar for next week and previous week?</p>, 08 Oct 2014 03:03:24 GMTWebSite Performance decreasing due to more records in gridview<p>Hi,</p> <p>In my website need to display 5000+ records in gridview. So, I used custom paging for static page bar and displaying 100 records per page. In stored procedure using ROW NUMBER() keyword to retrieve specific records from the database. Even though website is running dead slow. Is there any alternate way apart from the ROW NUMBER() to increase the website performance.&nbsp; Can anyone please suggest me...It is very critical for me. ...I followed the below article to achive custom paging. </p>, 01 Apr 2012 01:00:43 GMTWatch videos of YouTube in GridView ASP.Net<p>Any program?</p> <p><br />Thank!</p>, 10 Apr 2013 00:02:03 GMTWant to know MIME Type (Content Type) for .OBJ files (3D Models) to save in database<p>Hello ,</p> <p>Is it possible to upload .obj files ( 3D models ) to an sql server database ? thank you in advance .</p>, 21 Apr 2015 00:21:49 GMTViewDownload<p>I would Like to ask that i am having a problem if i click on a hyperlink in a gridview for view purpose in a _blank window it work well for images but for file like .docx .pdf .ppt it download those files rather than opening them in a window what would be problem?? what should i do??</p> <p>I'm using this code in aspx file!!</p> <p>&lt;asp:TemplateField HeaderText="List of Files"&gt;<br /> &lt;ItemTemplate&gt;<br /> &lt;asp:HyperLink ID="Hyp1" Target="_blank" runat="server" Width="100px" Text='&lt;%#Eval("Bui_File")%&gt;' NavigateUrl='&lt;%#Eval("Bui_File")%&gt;'&gt;&lt;/asp:HyperLink&gt;<br /> &lt;/ItemTemplate&gt;<br /> &lt;/asp:TemplateField&gt;</p>, 13 Jan 2014 04:46:33 GMTView PDF in browser by Selecting FileUpload using C# in ASP.Net<p>&nbsp;</p> <p>I want to view in the current page itself simply to enable the user to verify what they are going to upload .Also i want it to be done soon after selecting the pdf from fileupload to avoud the burden of clicking a button......plz help</p>, 13 Feb 2017 02:20:13 GMTView GridView details in label with parsian font in ASP.Net<p>hi</p> <p>I used below code to show number in persian language:</p> <pre class="brush: csharp">string value = Lblpey.Text.Trim(); char[] charArray = value.ToCharArray(); Lblpey.Text = toPersianNumber(new string(charArray)); </pre> <p>see below code:</p> <pre class="brush: csharp"> private void ViewOrderInfo(int data1) { using (SqlConnection conn = General.GetConnection()) { using (SqlCommand _cmd = General.GetCommand(&#34;Order_ViewInfo&#34;, conn)) { _cmd.Parameters.AddWithValue(&#34;@PeygiriCode&#34;, data1); conn.Open(); SqlDataReader _dr = _cmd.ExecuteReader(); while (_dr.Read()) { string valueK = Lblkol.Text.Trim(); char[] charArrayK = valueK.ToCharArray(); Lblkol.Text = toPersianNumber(new string(charArrayK)); Lblkol.Text = _dr[&#34;PriceTotalBaste&#34;].ToString(); Lblprice.Text = _dr[&#34;PriceT&#34;].ToString(); } } ]</pre> <p>how I can merg below code to show number in persian?</p> <pre class="brush: csharp"> string valueK = Lblkol.Text.Trim(); char[] charArrayK = valueK.ToCharArray(); Lblkol.Text = toPersianNumber(new string(charArrayK)); </pre> <p>with</p> <pre class="brush: csharp">Lblkol.Text = _dr[&#34;PriceTotalBaste&#34;].ToString();</pre> <p>these codes are in&nbsp; ViewOrderInfo(int data1)</p> <p>&nbsp;</p> <p>Best Regards</p> <p>Neda</p>, 26 Oct 2016 02:06:55 GMTValidation: Select CheckBoxList or enter data in TextBox in ASP.Net<p>Dear experts,</p> <p>I have 2 textbox&rsquo;s and checkbox list. I want user to either enter text in one of the textbox or select any item from the checkbox list. User has to do only one action i.e. either fill the first textbox or second text box or select any item from the list.</p> <p>Thanks &nbsp;</p>, 05 Mar 2014 05:14:12 GMTValidate whether GridView has rows or is Empty using Custom Validator in ASP.Net<p>Dears,</p> <p>How to validate if gridview is empty rows or not, i want to use ValidatorCalloutExtender.</p> <p>Thanks.</p>, 27 Nov 2013 02:02:56 GMTValidate TextBox inside GridView FooterTemplate (FooterRow) in ASP.Net<p>how to validate input data through textbox in footer template on button click in gridview</p>, 03 May 2014 00:54:09 GMTValidate TextBox in GridView if RadioButton inside same Row is checked using JavaScript in ASP.Net<p>if radio button &nbsp;selected as process in a row then i need check text box is empty or not using jquery or javascript in gridview?</p>, 06 May 2014 07:35:59 GMTValidation for dynamic gridview cells<p>Hi Friends</p> <p>i need a help. in my gridview i have</p> <p>i have a dropdownlist with tables. if i select the table, based on the columns the gridview displays.</p> <p>one table contains 9 columns and other contains 40 columns... for example....see the below.</p> <p><strong>Insert/Edit&nbsp;&nbsp;&nbsp; RoleUID&nbsp;&nbsp; RoleID&nbsp;&nbsp;&nbsp; Role&nbsp;&nbsp; Desc&nbsp;&nbsp; ....etc columns</strong></p> <p>here RoleId, role are mandatory fields... i am making those two with "*" red color. but if i click on the "INSERT" then i need to get a alert msg that the roleid is mandatory.. you should enter in interger value, and if "role" is null then same like "Role is mandatory... plz enter character value"</p> <p>i dont have any template fields in the gridview. i make autogeneratecolumns=true in my grid.</p> <p>its great if anyone helps me ...</p> <p>i need validation for the dynamic gridview cell... where there is no columns fixed...</p> <p>&nbsp;</p> <p>I used the below code send by AZIM... for&nbsp;INSERT&nbsp;</p> <p><code class="csharp keyword">for</code> <code class="csharp plain">(</code><code class="csharp keyword">int</code> <code class="csharp plain">j = 3; j &lt; cellCount; j++)</code></p> <div class="line number35 index34 alt2"><code class="csharp spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="csharp plain">{</code></div> <div class="line number36 index35 alt1"><code class="csharp spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="csharp comments">//here i am adding a control.</code></div> <div class="line number37 index36 alt2"><code class="csharp spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="csharp plain">TextBox textBox = </code><code class="csharp keyword">new</code> <code class="csharp plain">TextBox();</code></div> <div class="line number38 index37 alt1"><code class="csharp spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="csharp plain">textBox.ID = </code><code class="csharp string">"txtDynamicText"</code> <code class="csharp plain">+ j.ToString();</code></div> <div class="line number39 index38 alt2"><code class="csharp spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="csharp plain">textBox.Attributes.Add(</code><code class="csharp string">"runat"</code><code class="csharp plain">, </code><code class="csharp string">"server"</code><code class="csharp plain">);</code></div> <div class="line number40 index39 alt1"><code class="csharp spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="csharp plain">textBox.CssClass = </code><code class="csharp string">"Color"</code><code class="csharp plain">;</code></div> <div class="line number41 index40 alt2"><code class="csharp spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="csharp keyword">this</code><code class="csharp plain">.GridView1.Rows[rowsCount - 1].Cells[j].Controls.Add(textBox);</code></div> <div class="line number42 index41 alt1"><code class="csharp spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="csharp plain">}</code></div> <div class="line number42 index41 alt1"><code class="csharp plain"></code>&nbsp;</div> <div class="line number42 index41 alt1"><code class="csharp plain"></code>&nbsp;</div> <div class="line number42 index41 alt1"><code class="csharp plain">Thanks in advance....</code></div> <div class="line number42 index41 alt1"><code class="csharp plain"></code>&nbsp;</div> <div class="line number42 index41 alt1"><code class="csharp plain">Cheers.</code></div> <div class="line number42 index41 alt1"><code class="csharp plain">LeelaReddy</code></div>, 08 Dec 2013 04:19:29 GMT