|
Calling Office components from server code is clearly something Microsoft does not support. Microsoft support link : http://support.microsoft.com/kb/257757 .
This article discusses the complications that developers may face
|
|
|
|
|
Hi Everybody,
I have very specific requirement. I need to show river bed in interactive 3D format in ASP.net web based application. I have never worked on 3D. Please let me know what 3D engine I can use to create interactive web application. This website should be compatible with all major browsers.
thanks,
Umrahi
If you have faith in the cause and
the means and in God, the hot
Sun will be cool for you.
|
|
|
|
|
You mean like parametric 3D?, or just a node map?,
Do you have to rotate the river bed, showing the top and bottom?
Maybe your mean a 2D drawing or image. You need to be more specific in the term 3D. 3D could just mean wearing 3D glasses so the image stands out at you.
[EDIT]
I use 3D parametric CAD software at night to create parts and assemblies on the side as a hobby. Programs like GeoMagic Design use Direct X 9.0 as a canvas for drawing and displaying the parts. I think on Macs they use Open GL.
You should really Google the subject, because I've been here for 5 years, and your the first to ask.
[EDIT 2]
I guess there is such a thing. A HTML5 3D Parametric Open GL Support, control, module or something that will display a 3D Parametric file in multiple formats supported by SolidWorks, I forget the name of the standard format for parametric files, but it's the same used for 3D printers.
Hard part is making the drawing file. I know movies use Geomagic to scan a scene, and convert it to a node map, and then fill in the nodes to create a parametric map, for coloring and rendering.
Well, more fun that writing code for a living.
https://www.youtube.com/watch?v=a3G4bKnZ5kA[^]
[blog on the subject of 3DOpenGl and HTML5^]
modified 15-Jul-13 20:03pm.
|
|
|
|
|
How do you clear temporary files in an ASP.NET website project?
I have been building and rebuilding an ASP.NET program.
I made the horrible mistake, I think, of recently copying the published content back to the folder I was developing.
So now I have an unusual error when I build the code. It says That there is a duplicate definition in one file in a temporary directory with anohter file in a temporary directory.
Error 3 The type 'ChildEventHandler' exists in both 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files...\b90cc7a4\28d266b\assembly\dl3\c4cf1ea3\b6e4b808_ef7cce01\App_Code.DLL' and 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files...\b90cc7a4\28d266b\App_Code.asx5jp5d.dll' C:\inetpub\wwwroot...\Resources\usercontrols....ascx.cs 11 18 C:......\
I removed project and file names, of course, but this is basically what the error says.
Since the error is with temporary files, what should I do?
I do not see a "clear" option in visual studio to clear out the files of a compile.
http://i.stack.imgur.com/VgT2J.png
|
|
|
|
|
Try to clean the solution then rebuild it.
Help people,so poeple can help you.
|
|
|
|
|
The answer lies in the error message.
Navigate to:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files
and delete the files there.
<edit -="" fix="" typo="">
Every time you think, you weaken the nation.
|
|
|
|
|
I have created web application in asp.net. After session.Abandon() i am able to end the session in which i cannot go back and it will redirect to loginpage. But if i run in Google Chrome browser it is not working and if i click back it will come priviously opened page with data.
how to end the session of chrome browser in asp.net.
If anybody knows, please reply me.
Thanks in advance.
|
|
|
|
|
I think you have to abandon and remove all
Session.removeAll();
|
|
|
|
|
I did that also. It is not working for Google Chrome browser.
|
|
|
|
|
Technically session.removeAll works. Keep in mind that it's a server side call, and will erase all the session values on the web server.
Now if the browser still honors the session value, or thinks that the session value is valid, then that's a browser issue, or something else on the server is keeping the session value alive.
So you make a session in a test page, that contains a word or something, and click a button to remove all, and see if the session is erased., and play around with it.
I know that in certain modes, the session value will write a cookie on the client, with the session values. Using Firefox to examine the cookie values is useful to confirm the removal of the session value.
Chrome has alot of bugs in it, and became very bloated with code. It could just be a Chrome issue. That's out of your control, nothing you can do about it.
[EDIT]
Maybe it's the way you implemented the session, eg.
Dim m_context as httpcontext = httpcontext.current
m_context.session.add("Login", true)
if (true = m_context.session("Login") then
m_conetxt.response.redirect("admin.aspx")
End if
or perhaps the correct context was not used to create or remove the session, or the spelling of the session name does not exactly match.
Don't forget to delete your browser cache for a true test.
|
|
|
|
|
it's been several days since I am trying to resolve this issue. I have a page that is a mail inbox in the website. You can send messages to your friends from the list like on facebook.
It has AJAX code in a js file, 2 ashx files, and aspx, aspx.cs files. I was using facebox pop up when a user wanted to send a message to a friend. Now I changed the UI removed facebox and added a masterpage so that now the page is like any other page on the site. But after adding a masterpage to messages.aspx page the values of HttpContext become null after I click on send message. They are working fine when the page first loads that shows friends list and previous messages. It's when I fire a js function to save the message entered by clicking send that it's lost.
in message.aspx page I use 3 hidden fields:
<script>
function SavePostedMessage() {
var SenderAccountID = $("#hdnSenderID").val();
var ReceiverAccountID = $("#hdnReceiverID").val();
var Days = $("#hdnDays").val();
var body = GetmessageData();
if (body != null || body != "")
SaveMessageInDatabase(SenderAccountID, ReceiverAccountID, body, Days);
}
</script>
<asp:HiddenField ID="hdnSenderID" runat="server" />
<asp:HiddenField ID="hdnReceiverID" runat="server" />
<asp:HiddenField ID="hdnDays" runat="server" />
<a style="cursor: pointer;" onclick="SavePostedMessage()">
<div style="height: 25px; width: 85px; float: left; margin-top: 28px; padding-top: 5px;
background: #01B2E5; text-align: center;" id="uploadifyContainer"> Send
In messages.aspx.cs I put in page_load the code to register a js function: ScriptManager.RegisterStartupScript(this, typeof(string), "Play", "javascript:GetMessageConversation('" + Request.QueryString["AccountID"] + "','" + _userSession.CurrentUser.AccountID + "','7');", true);
In Ajax.js I defined function GetMessageConversation(SenderAccountID, ReceiverAccountID, Days) {
$("#hdnSenderID").val(SenderAccountID);
$("#hdnReceiverID").val(ReceiverAccountID);
$("#hdnDays").val(Days);
$("#divPostComment").show();
setSelected("trUser" + ReceiverAccountID);
$.ajax({
type: "POST",
url: "/MessageFacebox/GetMessageConversation.ashx",
data: 'SenderAccountID=' + SenderAccountID + "&ReceiverAccountID=" + ReceiverAccountID + "&Days=" + Days,
success: function (data) {
$('#messageconversationdata').html(data);
Scrollbottom();
},
error: function (errordata) {
alert('Sorry some error occurred');
}
});
}
function SaveMessageInDatabase(SenderAccountID, ReceiverAccountID, Body, days) {
$.ajax({
type: "POST",
url: "/MessageFacebox/SaveMessage.ashx",
data: 'SenderID=' + SenderAccountID + "&ReceiverID=" + ReceiverAccountID + "&Body=" + Body,
success: function (data) {
GetMessageConversation(SenderAccountID, ReceiverAccountID, days);
},
error: function () {
alert('Sorry some error occurred');
}
});
In GetMessageConversation.ashx context.Request.Form["SenderAccountID"] and context.Request.Form["ReceiverAccountID"] return stored values
Account senderAccount = _accountRepository.GetAccountByAccountID(Convert.ToInt32(context.Request.Form["SenderAccountID"]));
Account receiverAccount = _accountRepository.GetAccountByAccountID(Convert.ToInt32(context.Request.Form["ReceiverAccountID"]));
But in SaveMessage.ashx Account senderAccount = _accountRepository.GetAccountByAccountID(Convert.ToInt32(context.Request.Form["SenderID"])) ; Account receiverAccount = _accountRepository.GetAccountByAccountID(Convert.ToInt32(context.Request.Form["ReceiverID"] ));
context.Request.Form["SenderID"] and context.Request.Form["ReceiverID"] have null values.
the first one loads when the page is first accessed. The save function is called when user enters a message and click on send button in messages.aspx
All works fine without a master page. Once I add masterpage file to messages.aspx the code stops working.
Thanks in advance.
|
|
|
|
|
Did you test your data before transmuting, so you can isolate the problem between the client or server side?
alert('SenderAccountID=' + SenderAccountID + "&ReceiverAccountID=" + ReceiverAccountID + "&Days=" + Days,);
When changing to a masterpage, the id's change on the textboxes and labels, so a Ct100 is added as a prefix to the id of the element.
so you can change the id mode of the control to static, or change the way jquery finds the element to a wildcard prefix and then the id name.
|
|
|
|
|
Thanks for responding. That was the issue.
|
|
|
|
|
Hi All
I am facing one issue while downloading .xls file in my report page.I am describing the details below
Issue:
--> I am displaying some companies details in report page as table rows and columns like “<table><tr><td>company name……”
--> In report page I am having Download button ,when click on download button my companies details table data need to be download as .xls(Excel) file.
--> when clicking on download button its showing one alert box with following message "The file you are trying to open,XXXX,is in different format than specified by the file extension.Verify that the file is not corrupted and is from a trusted source before opening the file"
--> The below code I written for downloading file in my page.
Var outputhtml="";
outputhtml +="";
outputhtml +="";
outputhtml +="";
outputhtml +="";
Response.ContentType = "application/vnd.ms-excel";
Response.AddHeader( "Content-disposition","attachment; filename=My Company Details.xls");
Response.write(outputhtml);
Please help me to solve this issue.
Thanks in advance.
modified 14-Jul-13 21:48pm.
|
|
|
|
|
That could be a message from Excel. When you saved data in the new format and use the extension .xls instead of .xlsx, Excel will warn you. And similar the other way round. So just try
Response.AddHeader( "Content-disposition","attachment; filename=My Company Details.xlsx");
and make sure your Excel file is correctly named.
|
|
|
|
|
Hi,
I am beginning with asp.net and I have downloaded the following: VS Express 2012 (with asp.net 4.5 ) and sql server express from www.asp.net/downloads
I want to download some simple asp.net (c#) projects which will give me a basic understanding of the fundamentals of asp.net. e.g simple tricks and tips to do tasks in asp.net. Please advice.
Thanks !
|
|
|
|
|
|
Hi,
I need to export file in xlsx format. My code is bellow:
string Path = strFullTo + "Balancing_" + String.Format("{0:MMddyy}", DateTime.Now) + ".xlsx";
StringWriter stringWriter = new StringWriter();
HtmlTextWriter htmlWrite = new HtmlTextWriter(stringWriter);
GridView DataGrd = new GridView();
System.IO.StreamWriter vw = new System.IO.StreamWriter(Path, true,System.Text.Encoding.Default);
stringWriter.ToString().Normalize();
string style = @" .textmode { mso-number-format:\@; } ";
vw.Write(style);
vw.Write(stringWriter.ToString());
vw.Flush();
vw.Close();
But my problem is when I am trying to open the xlsx file it is saying "File format or extension is not valid".
I need to keep the data in xlsx file. Please help.
Thanks & Regards
Mishra
|
|
|
|
|
You need to export as .xls instead of .xlsx. .xlsx is more of an xml format but .xls can support html format, which is essentially what you are doing.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
I have created a treeview, which is binding categories and subcategories from database.
I want to display an icon (image) on left side of the treeview. For example, in treeview I have categories such as amana tool as a parent node and the router bits as child node of amana tool. So, in database I have icon of amana tool as well as icon of router bits. Now, I am able to show categories (amana tool) only in treeview. But, I need that left side should show the icon of the related categories and then categories name(amana tool).
Note: The icon should bind from database but it should not be static icon because I need to show more than 100 categories and the icon existing in database.
Please help me out.
Here my code works correctly , further what i have to do?
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
namespace ShopGear1.View
{
public partial class treefin : System.Web.UI.Page
{
private string scon = "";
protected void Page_Load(object sender, EventArgs e)
{
scon = " connection string";
ModuleTreeView.CollapseAll();
FillTreeView();
}
public DataTable GetModuleDetails()
{
using (SqlConnection conn = new SqlConnection(scon))
{
string sql = "sql query";
SqlDataAdapter da = new SqlDataAdapter(sql, conn);
DataTable dt = new DataTable();
da.Fill(dt);
return dt;
}
}
public void FillTreeView()
{
DataTable modules = new DataTable();
modules = GetModuleDetails();
ModuleTreeView.Nodes.Clear();
PopulateTreeNode(modules, null, 0);
}
private void PopulateTreeNode(DataTable modulelist, TreeNode parent, int parentid)
{
TreeNodeCollection baseNodes;
TreeNode node;
if (parent == null)
{
baseNodes = ModuleTreeView.Nodes;
}
else
{
baseNodes = parent.ChildNodes;
}
foreach (DataRow dtrow in modulelist.Rows)
{
if (int.Parse(dtrow["parent_orid"].ToString()) == parentid)
{
node = new TreeNode();
node.Text = dtrow["descript"].ToString();
node.Value = dtrow["code_webcategory_id"].ToString();
node.SelectAction = TreeNodeSelectAction.Select;
baseNodes.Add(node);
PopulateTreeNode(modulelist, node, int.Parse(dtrow["code_webcategory_id"].ToString()));
}
}
ModuleTreeView.CollapseAll();
}
}
}
|
|
|
|
|
![Go to Parent](https://www.codeproject.com/App_Themes/CodeProject/Img/arrow-up24.png) I had to program the ParentNodeStyle.ImageUrl = "The Image Path"
This is a treeview I made for ckEditor, it's all code in vb, but you should get the idea. It was created on Protected Sub OnInit().
As you create more nodes, just add the new image url
tv_FileBrowser_Content_Navigation = New TreeView
With tv_FileBrowser_Content_Navigation
.ID = [ID] & "_tv_FileBrowser_Content_Navigation"
.Style.Add(HtmlTextWriterStyle.Width, "90%")
.Style.Add(HtmlTextWriterStyle.PaddingTop, "25px")
.ExpandDepth = 10
.ImageSet = TreeViewImageSet.XPFileExplorer
.NodeIndent = 10
.ShowLines = True
.ShowExpandCollapse = True
.PathSeparator = Convert.ToChar("/")
.NodeStyle.ForeColor = Drawing.Color.Black
.NodeStyle.HorizontalPadding = 6
.NodeStyle.VerticalPadding = 0
.NodeStyle.NodeSpacing = 0
.RootNodeStyle.HorizontalPadding = 6
.ParentNodeStyle.ImageUrl = cs.GetWebResourceUrl(rsType, "Admin_PM_Standard.folder_0.png")
.ParentNodeStyle.HorizontalPadding = 6
.SelectedNodeStyle.ForeColor = Drawing.Color.Black
.SelectedNodeStyle.BackColor = Drawing.Color.LightGray
.SelectedNodeStyle.Font.Underline = False
.SelectedNodeStyle.HorizontalPadding = 6
.SelectedNodeStyle.VerticalPadding = 0
.HoverNodeStyle.Font.Underline = True
.HoverNodeStyle.ForeColor = Drawing.Color.Black
.HoverNodeStyle.BackColor = Drawing.Color.LightGray
node_Editor = New TreeNode("File Browser")
node_Editor.Selected = True
node_Editor.SelectAction = TreeNodeSelectAction.Expand
node_Editor.Text = "File Browser"
node_Editor.Value = "/Product/editor"
node_Editor.ImageUrl = cs.GetWebResourceUrl(rsType, "Admin_PM_Standard.myComputer.png")
.Nodes.Add(node_Editor)
'########################################################
'
node_Files = New TreeNode("files")
node_Files.CollapseAll()
node_Files.Selected = False
node_Files.SelectAction = TreeNodeSelectAction.Expand
node_Files.Text = "files"
node_Files.Value = "files"
node_Files.ImageUrl = cs.GetWebResourceUrl(rsType, "Admin_PM_Standard.folder_0.png")
node_Editor.ChildNodes.Add(node_Files)
'########################################################
'
node_Flash = New TreeNode("flash")
node_Flash.CollapseAll()
node_Flash.Selected = False
node_Flash.SelectAction = TreeNodeSelectAction.Expand
node_Flash.Text = "flash"
node_Flash.Value = "flash"
node_Flash.ImageUrl = cs.GetWebResourceUrl(rsType, "Admin_PM_Standard.folder_0.png")
node_Editor.ChildNodes.Add(node_Flash)
'########################################################
'
node_Images = New TreeNode("images")
node_Images.CollapseAll()
node_Images.Selected = False
node_Images.SelectAction = TreeNodeSelectAction.Expand
node_Images.Text = "images"
node_Images.Value = "images"
node_Images.ImageUrl = cs.GetWebResourceUrl(rsType, "Admin_PM_Standard.folder_0.png")
node_Editor.ChildNodes.Add(node_Images)
'########################################################
'Context Menu's
'########################################################
AddHandler .SelectedNodeChanged, AddressOf tv_FileBrowser_Content_Navigation_SelectedNodeChanged
AddHandler .TreeNodeExpanded, AddressOf tv_FileBrowser_Content_Navigation_TreeNodeExpanded
AddHandler .TreeNodeCollapsed, AddressOf tv_FileBrowser_Content_Navigation_TreeNodeCollapsed
End With
panel_FileBrowser_Content_TreeView.Controls.Add(tv_FileBrowser_Content_Navigation)
As you create each addtional node, you add the image url.
I know you can use an embedded image, but not sure how to use a database blob.
[edit]
I only created the first level nodes in the initial treeview. The child nodes are populated on demand, when a parent node is expanded, so an event handler was added to detect expand node, and upon expansion, the child nodes are added according to the parent node type or name.
I had load time issues on the first couple of tries, and had to speed it up a bit.
|
|
|
|
|
I am developing a web application, which have to get the data from selected Excel file and save it in SQL Database.
I want to select Excel File in runtime using the FileUpload control. Is this possible..? Please guide me..
|
|
|
|
|
hi SravanKumar-A,
yes it's possible....
first, his first save the file when uploaded, this means stored on the Server side, here you set it to accommodate PathLocation Files uploaded the results ..
then, you read his file based PathLocation excel file it in the store ..
how to read the contents of the data from the Excel file, you can googling, a lot of his examples ..
You must read the contents of his excel how many rows,
then you loop through the contents of each row to get her,
then you input into a database row-a row ..
after that you delete the file upload it if you save the file you do not use anymore ..
yes, this is just a logical course to determine the appropriate code logic what its like ..
|
|
|
|
|
previously we worked on Google calendar Version 2 but now we want to convert it to Google calendar version 3. If any one has worked on Google calendar version 3. Kindly send me a small project over it otherwise send me some details of migrating it to version 3.
The problem that i am facing is in verison 2, we use EventFeed, EventQuery, CalendarQuery, CalendarFeed so here i am getting the problem.
|
|
|
|
|
|