|
Thank you for response
|
|
|
|
|
|
Hai Sandeep Mewara,
In my Javascript file i wrote "window.print();" to print entire window. It works fine in Iphone browser, but it is not working in Android mobile browsers. Can you please help me to rectify this problem.
|
|
|
|
|
I use EPplus for Genrate Excel Report and use StoreProcedure To get data from database.
The problem is that I want to remove one of the columns of information in the report file by EPplus
modified 7-Jan-13 9:11am.
|
|
|
|
|
cawboy_iran wrote: Stored procedure should not be changed.
Based on what you say, you need to write code to open excel sheet and then delete the column you don't want. Look into excel programming.
|
|
|
|
|
thanx for your reply...
I leave My Code Here
I would remove the additional Column in and also want to change the page layout direction to (right to left)
Protected Sub btnExcel_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnExcel.Click
If "MYcondition is true" Then
GenerateXLSXFile(CreateDataTable())
End If
End Sub
Private Sub GenerateXLSXFile(ByVal tbl As DataTable)
Dim excelPackage = New ExcelPackage
Dim excelWorksheet = excelPackage.Workbook.Worksheets.Add("My_Worksheet")
excelWorksheet.View.ShowGridLines = False
excelWorksheet.Cells.Style.Border.Bottom.Style = Style.ExcelBorderStyle.Thick
excelWorksheet.Cells("A5").LoadFromDataTable(tbl, True)
excelWorksheet.Column(2).Hidden = True
excelWorksheet.View.PageLayoutView = excelWorksheet.View.RightToLeft
excelWorksheet.Cells("A5").Value = "header_1"
excelWorksheet.Cells("B5").Value = "header_2"
excelWorksheet.Cells("C5").Value = "header_3"
Response.ContentType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
Response.AddHeader("content-disposition", "attachment; filename=My_ExcelName.xlsx")
Dim stream As MemoryStream = New MemoryStream(excelPackage.GetAsByteArray())
Response.OutputStream.Write(stream.ToArray(), 0, stream.ToArray().Length)
Response.Flush()
Response.Close()
End Sub
Private Function CreateDataTable() As DataTable
Dim dataTable As New DataTable("tbl_Name")
Dim dataAdapter As New SqlDataAdapter()
Dim conn As New SqlConnection(ConfigurationManager.ConnectionStrings("ProvidersCS").ToString)
Dim cmd As New SqlCommand("My Select Command", conn)
cmd.CommandType = CommandType.StoredProcedure
Try
conn.Open()
dataAdapter.SelectCommand = cmd
dataAdapter.Fill(dataTable)
Catch ex As Exception
Finally
conn.Close()
End Try
Return dataTable
End Function
|
|
|
|
|
Hi,
I have installed WoW slider on my ASP.NET project. I don't know why images now showing on the slideshow.
The source is like this when I view the page source:
<li><img src="~/media/members/a54cfa97-04f1-11e2-bd34-00ffceb1d3b5/posts/9eeccaf5-512a-11e2-a96e-00ffceb1d3b5/dc58c410-544f-11e2-a96e-00ffceb1d3b5.png" alt="" title="" width="906px" height="360px" id="9"/></li>
the image url is correct and I can see the image if I copy the above image url after adding the domain like http://localhost:50083
How can I fix this problem?
Technology News @ www.JassimRahma.com
|
|
|
|
|
Jassim Rahma wrote: src="~/media/members
I doubt if you can see '~' in page view source.
Based on what you say, it surely is relative path issue. Do a right click on the not displayed image and see the source - you will get the final URL being used and probably the issue.
Sounds like it is a relative path issue. This is one of the most common issue faced in a structured website.
There is a method exposed to handle URL's. Have a read: ResolveUrl[^].
I would suggest you to use this Tip and resolve the path correctly before setting the control/image source: Resolving Paths in a Multi-Folder WebSite[^]
Doing something like this can also help:
<img src='<%=ResolveUrl("~/Images/Progress.gif")%>' align="absmiddle" />
|
|
|
|
|
this is my error
i change textbox at gridview to dropdownlist (tempaltefield)
Code:
string connString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=DB.mdb";
OleDbConnection con = new OleDbConnection(connString);
OleDbCommand cmd = new OleDbCommand();
cmd.CommandText = "UPDATE Pay SET pay_sup_name=@pay_sup_name,pay_value=@pay_value,pay_check_No=@pay_check_No WHERE pay_id=@pay_id";
cmd.Parameters.Add("@pay_check_No", OleDbType.VarChar).Value = ((TextBox)PayGridView.Rows[e.RowIndex].Cells[2].Controls[0]).Text;
cmd.Parameters.Add("@pay_value", OleDbType.VarChar).Value = ((TextBox)PayGridView.Rows[e.RowIndex].Cells[3].Controls[0]).Text;
cmd.Parameters.Add("@pay_sup_name", OleDbType.VarChar).Value = ((DropDownList)PayGridView.Rows[e.RowIndex].Cells[4].Controls[0]).SelectedValue;
cmd.Parameters.Add("@pay_id", OleDbType.Integer).Value = Convert.ToInt32(PayGridView.Rows[e.RowIndex].Cells[1].Text);
cmd.Connection = con;
con.Open();
cmd.ExecuteNonQuery();
con.Close();
|
|
|
|
|
amsedky wrote: Unable to cast object of type 'System.Web.UI.LiteralControl' to type 'System.Web.UI.WebControls.TextBox
//((TextBox)PayGridView.Rows[e.RowIndex].Cells[3].Controls[0]).Text;
Error in itself is quite straight forward.
You are directly casting controls from Grid cells into a defined type. One of the conversion is not correct. There is a Literal control instead of a textbox. A simple use of Visual Studio debugger will tell the line of code. Once you know, just handle it properly.
|
|
|
|
|
Hi
i need to display animated image while upload or save data into sql database and once finished hide the animated image
please help me how to do that in asp.net
thank's
|
|
|
|
|
|
I want to assign date from datatable format(01 Jan 2012) to excel element ..my prblm is while assigning to excel it changes to other format (01 01 2013)...plz give me solution to this...
|
|
|
|
|
I had similar problem with storing very long numbers in excel. I solved it by putting a single quote (') in front of the number. This way it was able to display the number properly and could also take this number in account in formulas and computations. Perhaps this trick could work on dates too. try putting '01 Jan 2012 in the excel and see if excel could recognize it as date.
Sadly, I don't have excel on this computer otherwise i would have tried it before posting.
Twenty years from now you will be more disappointed by the things that you didn't do than by the ones you did do. So throw off the bowlines. Sail away from the safe harbor. Catch the trade winds in your sails. Explore, Dream. Discover.
|
|
|
|
|
Hi,
Please enlight me how to insert/update/delete records based on generated textbox/checkbox.
I used the following code to generate the textbox/checkbox:
<asp:Repeater ID="myRepeater" runat="server" >
<HeaderTemplate>
<table >
<thead><tr>
<th>Terminal Tab</th>
<th>Terminal Attributes</th>
<th>Values
</th></tr></thead>
<tbody>
</HeaderTemplate>
<ItemTemplate>
<tr>
<td><%# Eval("TabName") %></td>
<td><%# Eval("TagName") %></td>
<td><%# GenerateTag(Eval("Datatype"))%></td>
</tr>
</ItemTemplate>
<FooterTemplate>
</tbody>
</table>
</FooterTemplate>
</asp:Repeater>
Below is the function of GenerateTag:
protected string GenerateTag(object objDataType)
{
String strTags = "";
switch (objDataType.ToString()) {
case "Char":
strTags = "<input id=tagText type=text />";
break;
case "Int":
strTags = "<input id=tagInt type=text />";
break;
case "Boolean":
strTags = "<input id=cbx type=checkbox />";
break;
default:
strTags = "<input id=strInput type=text />";
break;
}
return strTags;
}
I use the following SQL statement in myRepeater:
string strSQL = @"
Select T.ID
, T.TabID TabID
, Tab.Name TabName
, T.TagName
, T.AppID
, T.DataType
, T.MinLen
, T.MaxLen
, A.Name AppName
, T.Description
From TerminalAttrTag T
Left Join TerminalAttrApp A on T.AppID = A.ID
Left Join TerminalAttrTab Tab on T.TabID = Tab.ID
Where T.AppID = {0} or T.AppID = 1
Order by T.TabID, T.SeqNo
";
strSQL = String.Format(strSQL, AppID);
myRepeater.DataSource = bl.GetDataSet(ConnectionString, strSQL);
myRepeater.DataBind();
In screen, it shows:
Terminal Tab Attributes Values
Host Config Host Name (Textbox)
Host Config Host IP (Textbox)
Host Config Timeout (Textbox)
I can input below info:
Terminal Tab Attributes Values
Host Config Host Name Host Main
Host Config Host IP 172.1.1.1
Host Config Timeout 30
Now I want to be able to click "Add" button to input below record (2nd records).
Terminal Tab Attributes Values
Host Config Host Name Host Backup
Host Config Host IP 172.2.2.2
Host Config Timeout 50
I am thinking to use DetailsView but in the end I give up due to the dynamic generated textbox.
1. Please enlight me how I can add code in 'Add' button to insert records. Or which part of code need to be fixed or rewrite? And please advise the suitable way to handle this.
2. After problem of add/delete/update records solved, please enlight me how to loop through the records. I need to save all records to database or xml files.
Thank you for your patient.
|
|
|
|
|
Hi Guys ,
Whats the best way to implement a live update on an aspx page.Like commentary/score update of a live cricket match ?.Any good thoughts ? Please share
With Warm regards
|
|
|
|
|
Depends on how live you want it to be.
For most applications you can get away with polling the server from the client using javascript in one way or another. Jquery has a neat ajax/[^] method that will take away some of the client side pain. You can use this to get part of a web page.
If you want something a little more live-like you could consider long-polling, where you request the data immediately and the server only responds when the information has changed, or the poll interval "times out". Once the poll is done, the client re-polls immediately and the process repeats.
There is a discussion of the topic here[^]. In the article he talks about a technology called SignalR, which will help you with the long polling stuff.
|
|
|
|
|
The answer will hugely depend on the source of data that is being served. If you have some source of data that you need to put on your webpage after a regular interval then it can be easily done using AJAX . in fact, you can do it using simple ASP.NET updatepanel and timer control only.
Here is a small article that shows how to use the timer to keep the page updating after some interval. IN this demo application, only server time is being shown live to the user after certain time interval. you can simply show your data instead of that.
AJAX for Beginners (Part 1) - Understanding ASP.NET AJAX Server Controls[^]
Twenty years from now you will be more disappointed by the things that you didn't do than by the ones you did do. So throw off the bowlines. Sail away from the safe harbor. Catch the trade winds in your sails. Explore, Dream. Discover.
|
|
|
|
|
Hi,
I have the following code for WoW Slider to populate images in a slide show. I want to know how to make this dynamic and populate it at runtime from database?
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="member_post_banner.ascx.cs" Inherits="volow.member_post_banner" %>
<%@ Register Assembly="DevExpress.Web.ASPxEditors.v11.1, Version=11.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dx" %>
<div id="wowslider-container1">
<div class="ws_images"><ul>
<li><img src="../images/members/a54cfa97-04f1-11e2-bd34-00ffceb1d3b5/posts/9eeccaf5-512a-11e2-a96e-00ffceb1d3b5/1c957ee0-52cb-11e2-a96e-00ffceb1d3b5.jpg" alt="Yahoo!" title="Yahoo!" width="906px" height="360px" id="wows1_0"/></li>
<li><img src="../images/members/a54cfa97-04f1-11e2-bd34-00ffceb1d3b5/posts/9eeccaf5-512a-11e2-a96e-00ffceb1d3b5/3c0d94fb-52cb-11e2-a96e-00ffceb1d3b5.jpg" alt="Google" title="Google" width="906px" height="360px" id="wows1_1"/></li>
<li><img src="../images/members/a54cfa97-04f1-11e2-bd34-00ffceb1d3b5/posts/9eeccaf5-512a-11e2-a96e-00ffceb1d3b5/74fac6d2-52cb-11e2-a96e-00ffceb1d3b5.png" alt="Microsoft" title="Microsoft" width="906px" height="360px" id="wows1_2"/></li>
<li><img src="../images/members/a54cfa97-04f1-11e2-bd34-00ffceb1d3b5/posts/9eeccaf5-512a-11e2-a96e-00ffceb1d3b5/91ba430d-52d1-11e2-a96e-00ffceb1d3b5.png" alt="Apple" title="Apple" width="906px" height="360px" id="wows1_3"/></li>
<li><img src="../images/members/a54cfa97-04f1-11e2-bd34-00ffceb1d3b5/posts/9eeccaf5-512a-11e2-a96e-00ffceb1d3b5/99dc0aca-8d86-429e-8d16-ab3ef907536a.png" alt="Blackberry" title="Blackberry" width="906px" height="360px" id="wows1_4"/></li>
<li><img src="../images/members/a54cfa97-04f1-11e2-bd34-00ffceb1d3b5/posts/9eeccaf5-512a-11e2-a96e-00ffceb1d3b5/570e903d-52cb-11e2-a96e-00ffceb1d3b5.png" alt="Samsung" title="Samsung" width="906px" height="360px" id="wows1_5"/></li>
<li><img src="../images/members/a54cfa97-04f1-11e2-bd34-00ffceb1d3b5/posts/9eeccaf5-512a-11e2-a96e-00ffceb1d3b5/a9e6ef60-245d-442a-8016-acee45fa8b98.png" alt="Oracle" title="Oracle" width="906px" height="360px" id="wows1_6"/></li>
<li><img src="../images/members/a54cfa97-04f1-11e2-bd34-00ffceb1d3b5/posts/9eeccaf5-512a-11e2-a96e-00ffceb1d3b5/a6014d5b-fed0-4ca2-a686-0e591b43235e.png" alt="Cisco" title="Cisco" width="906px" height="360px" id="wows1_7"/></li>
<li><img src="../images/members/a54cfa97-04f1-11e2-bd34-00ffceb1d3b5/posts/9eeccaf5-512a-11e2-a96e-00ffceb1d3b5/ac068a56-52ca-11e2-a96e-00ffceb1d3b5.png" alt="Dell" title="Dell" width="906px" height="360px" id="wows1_8"/></li>
<li><img src="../images/members/a54cfa97-04f1-11e2-bd34-00ffceb1d3b5/posts/9eeccaf5-512a-11e2-a96e-00ffceb1d3b5/ae21819f-52d2-11e2-a96e-00ffceb1d3b5.png" alt="Acer" title="Acer" width="906px" height="360px" id="wows1_9"/></li>
<li><img src="../images/members/a54cfa97-04f1-11e2-bd34-00ffceb1d3b5/posts/9eeccaf5-512a-11e2-a96e-00ffceb1d3b5/b5021faa-5380-11e2-a96e-00ffceb1d3b5.png" alt="Cute" title="Cute" width="906px" height="360px" id="wows1_10"/></li>
</ul></div>
<div class="ws_bullets"><div>
<a href="#" title="Yahoo!"><img src="../images/members/a54cfa97-04f1-11e2-bd34-00ffceb1d3b5/posts/9eeccaf5-512a-11e2-a96e-00ffceb1d3b5/1c957ee0-52cb-11e2-a96e-00ffceb1d3b5.jpg" alt="Yahoo!" width="160px" height="100px" />1</a>
<a href="#" title="Google"><img src="../images/members/a54cfa97-04f1-11e2-bd34-00ffceb1d3b5/posts/9eeccaf5-512a-11e2-a96e-00ffceb1d3b5/3c0d94fb-52cb-11e2-a96e-00ffceb1d3b5.jpg" alt="Google" width="160px" height="100px" />2</a>
<a href="#" title="Microsoft"><img src="../images/members/a54cfa97-04f1-11e2-bd34-00ffceb1d3b5/posts/9eeccaf5-512a-11e2-a96e-00ffceb1d3b5/74fac6d2-52cb-11e2-a96e-00ffceb1d3b5.png" alt="Microsoft" width="160px" height="100px" />3</a>
<a href="#" title="Apple"><img src="../images/members/a54cfa97-04f1-11e2-bd34-00ffceb1d3b5/posts/9eeccaf5-512a-11e2-a96e-00ffceb1d3b5/91ba430d-52d1-11e2-a96e-00ffceb1d3b5.png" alt="Apple" width="160px" height="100px" />4</a>
<a href="#" title="Blackberry"><img src="../images/members/a54cfa97-04f1-11e2-bd34-00ffceb1d3b5/posts/9eeccaf5-512a-11e2-a96e-00ffceb1d3b5/99dc0aca-8d86-429e-8d16-ab3ef907536a.png" alt="Blackberry" width="160px" height="100px" />5</a>
<a href="#" title="Samsung"><img src="../images/members/a54cfa97-04f1-11e2-bd34-00ffceb1d3b5/posts/9eeccaf5-512a-11e2-a96e-00ffceb1d3b5/570e903d-52cb-11e2-a96e-00ffceb1d3b5.png" alt="Samsung" width="160px" height="100px" />6</a>
<a href="#" title="Oracle"><img src="../images/members/a54cfa97-04f1-11e2-bd34-00ffceb1d3b5/posts/9eeccaf5-512a-11e2-a96e-00ffceb1d3b5/a9e6ef60-245d-442a-8016-acee45fa8b98.png" alt="Oracle" width="160px" height="100px" />7</a>
<a href="#" title="Cisco"><img src="../images/members/a54cfa97-04f1-11e2-bd34-00ffceb1d3b5/posts/9eeccaf5-512a-11e2-a96e-00ffceb1d3b5/a6014d5b-fed0-4ca2-a686-0e591b43235e.png" alt="Cisco" width="160px" height="100px" />8</a>
<a href="#" title="Dell"><img src="../images/members/a54cfa97-04f1-11e2-bd34-00ffceb1d3b5/posts/9eeccaf5-512a-11e2-a96e-00ffceb1d3b5/ac068a56-52ca-11e2-a96e-00ffceb1d3b5.png" alt="Dell" width="160px" height="100px" />9</a>
<a href="#" title="Acer"><img src="../images/members/a54cfa97-04f1-11e2-bd34-00ffceb1d3b5/posts/9eeccaf5-512a-11e2-a96e-00ffceb1d3b5/ae21819f-52d2-11e2-a96e-00ffceb1d3b5.png" alt="Acer" width="160px" height="100px" />10</a>
<a href="#" title="Cute"><img src="../images/members/a54cfa97-04f1-11e2-bd34-00ffceb1d3b5/posts/9eeccaf5-512a-11e2-a96e-00ffceb1d3b5/b5021faa-5380-11e2-a96e-00ffceb1d3b5.png" alt="Cute" width="160px" height="100px" />11</a>
</div></div>
<a class="wsl" href="http://wowslider.com">jQuery 3d Gallery by WOWSlider.com v2.8</a>
<div class="ws_shadow"></div>
</div>
Technology News @ www.JassimRahma.com
|
|
|
|
|
Hi,
I am looking for a good CMS to use with ASP.NET project..
Do you recommand Umbarco or Joomla or ....?
Technology News @ www.JassimRahma.com
|
|
|
|
|
I have worked extensively with Joomla in the past. I also got some chance to work with Umbraco but that was only for one project. I think, since your project is in ASP.NET you should use Umbraco. This way you can use common nomenclature across your website and this CMS. Also, the knowledge of ASP.NET will come in handy if you need to have some customized behavior.
Twenty years from now you will be more disappointed by the things that you didn't do than by the ones you did do. So throw off the bowlines. Sail away from the safe harbor. Catch the trade winds in your sails. Explore, Dream. Discover.
|
|
|
|
|
I only used Umbraco among free CMS systems, but whenever I would recommend it depends on what do you want to use it for.
If you want it for small personal site, especially for yourself then it is good choice.
If you look for free solution to implement large project for your client, then it is neither free nor easy to customize.
Admin console is way too powerful with options to modify page templates, giving the client easy way to screw up developer's work. Also deployments are hell without paid addons if you have many page types.
--
"My software never has bugs. It just develops random features."
|
|
|
|
|
Is there any javascript slideshow control where i can bind it dynamically from database?
|
|
|
|
|
You would have to create a web service that returns your data in JSON, but not knowing what the data is prevents me from answering the question further.
Is it a image url?
HTML?
|
|
|
|
|
I have to show swf files in that control.
|
|
|
|