|
The above code does not give any error when I put your code in a master page in VS 2008.
Please check your extension of the above master page.
The above error could occure if you put the above code in an .aspx file.
Master pages should have the extension of .master.
|
|
|
|
|
Thank you.
But ,I checked my file's name,it is sure that the master page have the extension of .master.
Besides,I do a further checking.
When I remove the blank line in the "div" tags,the design view run normal.
Then I restored the blank line ,the page also gone well.
Next,I rebuild a master page again,the same as the last,design view report the mistake.
Then I remove the code <asp:ContentPlaceHolder id="head" runat="server"> </asp:ContentPlaceHolder> in the "head" tags,the master page also could run normal without mistake.
Like the last step,I restored the code in "head" tags,the master page run well.
I think,is there any bug with the VS2008 in my computer?
Because I also meet a similar problem about the master page in another project. The mster page run very well,but the other .aspx pages which use the master page,have nothing in design view.
All the above-mentioned pages can run very well in Browser.
And the Wrong master pages also can view normally with no mistakes in VS2005.
modified on Saturday, April 11, 2009 9:29 AM
|
|
|
|
|
Hi All
My requirement is create a dynamic sitemap, i have already set my web application there have more than 50 pages, and also there 3 master pages for different modules, so i need create sitemap, which i need to add dynamic names there (ex-different product names), so pls help me to do this,and i've tried something as follows
1. is there any way to add dynamic nodes to web.sitemap,
2 and also , using StaticSiteMapProvider how can i use that with my web forms, in Page_Load event,
Thanks
|
|
|
|
|
Hello Fred's
I have Deploy Web Application on a Server.Server has a Static IP Address.
This Application Developed in Asp.Net Which use Modem For SMS Sending.
modem Install On Com Port5 if i am run application from server then It's ok
But as Soon as i run application from other machine Com Port Disable Automatic.
In event Viewer Following Warning Message Thrown.
When i first time Deploy and Check From other Machine then It's Work Fine
But after Sometime Same Machine Has same Problem.
Error Says that "Access Denied for Com Port 5" and After That Modem Port Disable permanently
After Restart Machine Com Port Enable Again automatic.
There may be Security Problem.How I can Solved this Problem.
In event Viewer Following Event Fire.
Event Type: Warning
Event Source: ASP.NET 2.0.50727.0
Event Category: Web Event
Event ID: 1309
Date: 4/10/2009
Time: 11:19:51 PM
User: N/A
Computer: KETAN-1CCDAA7E5
Description:
Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 4/10/2009 11:19:51 PM
Event time (UTC): 4/10/2009 5:49:51 PM
Event ID: 6e414ffa5de6479fb1fff241887ed1f7
Event sequence: 8
Event occurrence: 1
Event detail code: 0
Application information:
Application domain: /LM/w3svc/1/ROOT/H1-2-128838592248125000
Trust level: Full
Application Virtual Path: /H1
Application Path: d:\inetpub\wwwroot\H1\
Machine name: KETAN-1CCDAA7E5
Process information:
Process ID: 1864
Process name: aspnet_wp.exe
Account name: KETAN-1CCDAA7E5\ASPNET
Exception information:
Exception type: CommException
Exception message: Unable to open port COM4: Unable to open COM4
Access is denied
Request information:
Request URL: http://116.74.118.18/h1/Default.aspx
Request path: /h1/Default.aspx
User host address: 117.198.182.42
User:
Is authenticated: False
Authentication Type:
Thread account name: KETAN-1CCDAA7E5\ASPNET
Thread information:
Thread ID: 1
Thread account name: KETAN-1CCDAA7E5\ASPNET
Is impersonating: False
Stack trace: at GsmComm.GsmCommunication.GsmPhone.Open()
at GsmComm.GsmCommunication.GsmCommMain.Open()
at _Default.Button1_Click(Object sender, EventArgs e)
at System.Web.UI.WebControls.Button.OnClick(EventArgs e)
at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Custom event details:
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
http://webaspdotnet.blogspot.com/
|
|
|
|
|
It looks like a hardware problem, are you sure that hard ware is correct?
be a part of the solution, rather then problem
|
|
|
|
|
Yes Hardware Is ok.
Even i am run application using real ip address from my pC.it's Work fine But If Some One Access Application From Remote PC.The Port Number disable Permanently. Now if i Restart my Machine All Works Fine Again.
So i not think this Hardware Problem they may be security problem but not exact know.
Thanks for answer.
http://webaspdotnet.blogspot.com/
|
|
|
|
|
I've been digging to find out how well the professional addons for visual studio 2008 work for integration with office, and I've come up with nothing.
I'd appreciate any information, opinions or experience, but specifically I'd like to know if it's capable of generating older excel documents and functions in .net 2.0.
Thanks for any answers guys
|
|
|
|
|
I have done Paging with Page number links and Previous Next Links like( Prev 1 2 3 4 Next )in Repeater.And it workd fine.But I want to avoid Javascript and create this links(Paging).
|
|
|
|
|
Hi Guys,
I need your help I have forms authentication setup on an asp.net portal. Even though I have the auth ticket to "NOT" persist, it does so after closing the browser... I have tried all the tricks with FormsAuthentication.SignOut() but still no cure.
Is there a way I could get rid of the forms auth cookie when the client browser is closed??
Many thanks in advance
Green Grape
|
|
|
|
|
Grapes-R-Fun wrote: Even though I have the auth ticket to "NOT" persist
How? That's the first thing I would check. If there is a mechanism that is supposed to result in the browser not caching the cookie and it's not working then the first thing I would suspect is my implementation of the mechanism.
|
|
|
|
|
Mike, I don't know what's causing it to behaive this way... I'm running out of options!
This is my code:
if (_IsAuthenticated)
{
FormsAuthenticationTicket _ticket = new FormsAuthenticationTicket(1,
this.userHandletbx.Text + "_" + DateTime.Now.ToString(),
DateTime.Now,
DateTime.Now.AddMinutes(30),
false,
String.Empty,
FormsAuthentication.FormsCookiePath);
string _encryptedTicket = FormsAuthentication.Encrypt(_ticket);
HttpCookie _authCookie = new HttpCookie(
FormsAuthentication.FormsCookieName,
_encryptedTicket);
_authCookie.Secure = false;
Response.Cookies.Add(_authCookie);
FormsAuthentication.RedirectFromLoginPage(this.userHandletbx.Text, true);
}
And this is my web.config:
<authentication mode="Forms">
<forms loginUrl="Login.aspx"
name=".ASPXFORMSAUTH"
protection="All"
path="/"
timeout="40"
defaultUrl="Home.aspx"
enableCrossAppRedirects="false"
slidingExpiration="true">
</forms>
</authentication>
...and no matter where I stick
FormsAuthentication.SignOut() it doesn't kill that darn cookie!
Am I missing something? Is this a blonde moment I'm having?
Thanks for your help, by the way.
Green Grape
|
|
|
|
|
Grapes-R-Fun wrote: ...and no matter where I stick
FormsAuthentication.SignOut()
it doesn't kill that darn cookie!
Am I missing something?
First two obvious questions are:
1) Is the code executing? The function can't work if it is never being called.
2) Have you followed all the directions of the documentation for the SignOut method?
|
|
|
|
|
Hi,
I have a problem of storing .swf files to SQL Server 2005. Currently my application is storing Image( .bmp, .gif, .png, .jpg, .htm, .html,.png,wmf ) in Binary Field in a table.
I would like to store .swf file in the binary table and retrieve for further processing.
Appreciate if anybody has idea about this.
Thanks in advance.
|
|
|
|
|
AARIFBANGI wrote: Appreciate if anybody has idea about this.
If you are already storing ".bmp, .gif, .png, .jpg, .htm, .html,.png,wmf" then what is the difference between them and .swf?
|
|
|
|
|
I am getting OutofMemory Exception at below code -
newImage = Image.FromFile(value);
Reason: System.Drawing.Image doesn't support the .swf, so the problem is for uploading the flash.
|
|
|
|
|
AARIFBANGI wrote: so the problem is for uploading the flash.
A so nothing at all to do with "a problem of storing .swf files to SQL Server 2005" as you originally stated.
So, why do you want the swf file in the Image if you are just trying to upload it to the SQL Server? Is there something else you are doing with the file that you are not telling us?
|
|
|
|
|
I just want to store swf in SQL Server in binary field. The code snippet
Image newImage = Image.FromFile(Value) is Existing code and that causes the OutOf Memory Exception.
Just pl advice me as how to store .swf in binary field of SQL Server.
There is nothing that I am hiding from you. IT is just storing the .swf and display it in Winform and WebPage.
Thanks for your quick response.
|
|
|
|
|
AARIFBANGI wrote: Just pl advice me as how to store .swf in binary field of SQL Server.
It should be as you are doing just now. However, who ever wrote the code is attempting to load images into an Image object for some reason that seem unrelated to putting the image in the database.
How do you currently put the other image types in the database?
|
|
|
|
|
Hi all , again
I continue with my problem of export excel to sql-server.
I got export sheets of excel to a table of sql-server with this code:
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
'Path of file in machine of user
Label2.Text = System.IO.Path.GetFullPath(FileUpload1.PostedFile.FileName)
Dim connString As String = _
"Provider = Microsoft.Jet.OLEDB.4.0;" & _
"Data Source = " & "'" & Label2.Text & "';" & _
"Extended Properties = 'Excel 8.0;HDR=Yes'"
Dim cnn As New OleDbConnection(connString)
Try
Dim sql As String = _
"INSERT INTO T_Recibos " & _
"IN ''[ODBC;DRIVER={SQL Server};" & _
"Server=Ip_Server;" & _
"Database=NameDatabase;" & _
"UID=User;" & _
"PWD=password]" & _
"SELECT Id_Comunidad, Id_finca FROM [Hoja1$]"
Dim cmd As New OleDbCommand(sql, cnn)
cnn.Open()
Dim n As Integer = cmd.ExecuteNonQuery()
Label1.Text = "Número de registros afectados: " & n.ToString
Catch ex As OleDbException
Label1.Text = (ex.Errors(0).Message)
Catch ex As Exception
Label1.Text = (ex.Message)
Finally
' Cerramos la conexión
cnn.Close()
cnn = Nothing
End Try
End Sub
End Class
Now my problem is the next, when I try it from my web(not IIS local) and from Sql-Server allocated in my server (not my local Sql-Server) I receive a error that say me that doesn't find the excel file.
I understand why, the problem is that the path only work if the file excel is in the same server that SQL-Server.
A solve will be upload the file excel and later make all but I want to know if is possible with asp.net make it directly from file excel allocate in local machine of user to Sql-Server allocated in a server far of user.
Thanks again by all I am a little desespetare with this
|
|
|
|
|
Hi all,
I have a hyperlink in a Accordion ajax control,now i use this code for finding it:
Dim hpl As HyperLink = CType(acc.FindControl("hpl"), HyperLink)
this Error comes: object reference not set to an object
now how i can find my hyperlink ?
Hoda
|
|
|
|
|
|
thank you,
1. Are you using tag for hyperlink or use HyperLink control from toolbox.
--->i used HyperLink control from toolbox.
2. If you are using control from toolbox, What is the ID of HyperLink Control.
--->I changed its ID to hpl.
Hoda
|
|
|
|
|
if you are using hyperlink control, why do you need to find that control. You can access it like:
Me.hpl.NavigateURL = "http://Yahoo.com"
be a part of the solution, rather then problem
|
|
|
|
|
Hi Friends....Please help me...
i successfully uploaded the image...when i replace that image i am not getting(replaced image) new image, i am getting old image when i downloaded.
When i close the website and login ....new image is comming...
so, please any one help me, what is the solution...
thank you,
|
|
|
|
|
I am a newbie at C#. Following code was generated mostly by the tool Visual Web Developer 2005 (with SQL Server 2008 express edition). It actually worked but now neither update nor delete work properly. There is no error message too. The database is very simple with a simple database table called 'Product'.
Any obvious gotchas - I have spent too much time on this already.
Thanks.
<%@ Page Language="C#" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:GridView ID="GridView1" runat="server" AllowPaging="True" AllowSorting="True"
AutoGenerateColumns="False" DataKeyNames="ProductId" DataSourceID="ObjectDataSource1">
<Columns>
<asp:CommandField ShowDeleteButton="True" ShowEditButton="True" />
<asp:BoundField DataField="ProductId" HeaderText="ProductId" InsertVisible="False"
ReadOnly="True" SortExpression="ProductId" />
<asp:BoundField DataField="ProductDescription" HeaderText="ProductDescription" SortExpression="ProductDescription" />
<asp:BoundField DataField="ProductFamilyId" HeaderText="ProductFamilyId" SortExpression="ProductFamilyId" />
<asp:BoundField DataField="UnitPrice" HeaderText="UnitPrice" SortExpression="UnitPrice" />
<asp:BoundField DataField="StartDate" HeaderText="StartDate" SortExpression="StartDate" />
<asp:BoundField DataField="ExpirationDate" HeaderText="ExpirationDate" SortExpression="ExpirationDate" />
</Columns>
</asp:GridView>
<asp:ObjectDataSource ID="ObjectDataSource1" runat="server" DeleteMethod="Delete"
InsertMethod="Insert" OldValuesParameterFormatString="original_{0}" SelectMethod="GetData"
TypeName="ServiceDataSetTableAdapters.ProductTableAdapter" UpdateMethod="Update">
<DeleteParameters>
<asp:Parameter Name="Original_ProductId" Type="Int32" />
<asp:Parameter Name="Original_ProductDescription" Type="String" />
<asp:Parameter Name="Original_ProductFamilyId" Type="Decimal" />
<asp:Parameter Name="Original_UnitPrice" Type="Decimal" />
<asp:Parameter Name="Original_StartDate" Type="DateTime" />
<asp:Parameter Name="Original_ExpirationDate" Type="DateTime" />
</DeleteParameters>
<UpdateParameters>
<asp:Parameter Name="ProductDescription" Type="String" />
<asp:Parameter Name="ProductFamilyId" Type="Decimal" />
<asp:Parameter Name="UnitPrice" Type="Decimal" />
<asp:Parameter Name="StartDate" Type="DateTime" />
<asp:Parameter Name="ExpirationDate" Type="DateTime" />
<asp:Parameter Name="Original_ProductId" Type="Int32" />
<asp:Parameter Name="Original_ProductDescription" Type="String" />
<asp:Parameter Name="Original_ProductFamilyId" Type="Decimal" />
<asp:Parameter Name="Original_UnitPrice" Type="Decimal" />
<asp:Parameter Name="Original_StartDate" Type="DateTime" />
<asp:Parameter Name="Original_ExpirationDate" Type="DateTime" />
</UpdateParameters>
<InsertParameters>
<asp:Parameter Name="ProductDescription" Type="String" />
<asp:Parameter Name="ProductFamilyId" Type="Decimal" />
<asp:Parameter Name="UnitPrice" Type="Decimal" />
<asp:Parameter Name="StartDate" Type="DateTime" />
<asp:Parameter Name="ExpirationDate" Type="DateTime" />
</InsertParameters>
</asp:ObjectDataSource>
</div>
</form>
</body>
</html>
|
|
|
|