|
Blumen wrote: Right click project - Add New Item - there is no content page listed there in the Open box.
No, You will not get Content page in Open Box. Just Select a Web Form and Checked The "Select Master Page" Checkbox on
Note : It should only be enabled if you have added a Master page on your web application.
or even you can add a web form, delete all aspx code and add those code
<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
</asp:Content>
Note : Change code according to your requriment.
|
|
|
|
|
in visual studio 2005, i want to create more than one menu of a website.and i think must create more than one sitemap file.but i could't do it.So can you help me this trob?thanks
|
|
|
|
|
|
Hi:
I am using gridview in which text box is added in <template field="">
|
|
|
|
|
Why dont you add the validator to the edit template of the corresponding column??
Just convert the column to a template
>For the gridview > Edit Columns > Select the column > Click convert to template
Then in the template, just add your validator
Alexei Rodriguez
|
|
|
|
|
how to bind data from date base to tree view
or must export date to xml,sitemab
can i do it manualy (hope)
thanks.
ahmed eldeghedy
|
|
|
|
|
If you retrieve the data from the database using a DataReader you can populate a TreeView like this:
while (dataReader.Read())
{
TreeNode _newNode = new TreeNode();
_newNode.Text = "...";
_newNode.ImageUrl = "...";
_newNode.SelectAction = TreeNodeSelectAction.Expand;
_newNode.Target = "...";
_newNode.NavigateUrl = "...";
_newNode.Expanded = false;
myTreeMenu.Nodes.Add(_newNode);
}
|
|
|
|
|
me == asp.net newbie
i have this web site which gets connected to a sql database for users and i got it working on the localhost - i can add users , log in , sign up etc ..
but when i upload it to my web host and try do do these things , i get :
Generating user instances in SQL Server is disabled. Use sp_configure 'user instances enabled' to generate user instances.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.SqlClient.SqlException: Generating user instances in SQL Server is disabled. Use sp_configure 'user instances enabled' to generate user instances.
is it a problem that i can resolve by myself or is just that the host does not accept sql stuff ?
and if i can repiar it myself, how do i do it ? (please use asp-newbie language to me )
Thank you
modified on Saturday, November 15, 2008 9:29 AM
|
|
|
|
|
Hi all, I will try explain you my problem.
I have file pdf in a field of my database of SQ-Server.
I have a master page and content.
I want two options: or open new page for see pdf with focus in it or response.redirect into content.
I get open my pdf with:
Protected Sub gridView_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles GridView.SelectedIndexChanged
Try
If GridView.SelectedIndex >= 0 Then
Response.Redirect("~/Formularios/VisorFicheros.aspx?Id=" + gridView.SelectedRow.Cells(1).Text)
End If
Catch ex As Exception
End Try
End Sub
but it open all pdf in my master page losing my main menu etc, open my pdf to full page.
i would like to open the pdf in a content of master page but doesn't work i put the code of "visorficheros.aspx" that open my pdf from database
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Try
Dim id As Integer = Request.QueryString("Id")
Dim imagedata() As Byte = Ficheros.ObtenerContenidoFichero(id)
Response.ClearContent()
Response.ContentType = "application/pdf"
Response.AddHeader("content-length", imagedata.Length.ToString())
Response.BinaryWrite(imagedata)
Response.Flush()
Response.Close()
Catch ex As Exception
End Try
End Sub
Some idea?
also I will try to open with javascript with window.open (I don't like it I prefer that my code be only vb.net without javascript)
I put the code:
Protected Sub gridView_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles GridView.SelectedIndexChanged
Try
If GridView.SelectedIndex >= 0 Then
'Response.Write("<script language='JavaScript'>window.open('VisorFicheros.aspx?Id=" + gridView.SelectedRow.Cells(1).Text + "')</script>"
End If
Catch ex As Exception
End Try
End Sub
but I have 2 problem, the first more important is that I.E block it because is a pop-up and the second problem is that I lost the focus and it is put behind of master page.
Is possible to make it without javascript, vbscript etc only with vb.net?
some idea?
thanks for your help, I am becoming madwoman with it
|
|
|
|
|
You can't launch a new page with vb.net, at all. It runs on the server. An anchor tag with target='_blank' will open a new page, this new page can be passed an id on the URL, and generate/return/whatever your PDF
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
where I put target='_blank' ?
if I put it into windows.open is the same I.E will block it because it believes that is pop-up
and into response.redirect is not possible.
sorry I don't understand your solve.
|
|
|
|
|
You put target="_blank" in the A tag, eg:
<a href="page.html" target="_blank">link</a>
And since you have no control over IE's popup blocker there's not much else you can do if it's blocked.
Regards,
--Perspx
"A refund for defective software might be nice, except it would bankrupt the entire software industry in the first year." -Andrew Tanenbaum
"Einstein argued that there must be simplified explanations of nature, because God is not capricious or arbitrary. No such faith comforts the software engineer." -Fred Brooks
|
|
|
|
|
sorry but I don't have
<a href="page.html" target="_blank">link</a>
I have
Response.Write("<script language='JavaScript'>window.open('VisorFicheros.aspx?Id=" + gridView.SelectedRow.Cells(1).Text + "',target='_blank' )</script>")
but it is the same that
Response.Write("<script language='JavaScript'>window.open('VisorFicheros.aspx?Id=" + gridView.SelectedRow.Cells(1).Text + "')</script>")
I don't see any diferent, I.E continue block and with I.E.6 the focus is into master page and not into new window
for me is important make it without window.open because i.e block it.
For sample if I make it with a linkbutton work well the window.open (doesn't block i.e) but I don't know like do it with into my event gridView_SelectedIndexChanged, any idea?
thanks for all
|
|
|
|
|
You can use the JavaScript location.href property as follows:
location.href = [URL];
to open the page in the current window.
Regards,
--Perspx
"A refund for defective software might be nice, except it would bankrupt the entire software industry in the first year." -Andrew Tanenbaum
"Einstein argued that there must be simplified explanations of nature, because God is not capricious or arbitrary. No such faith comforts the software engineer." -Fred Brooks
|
|
|
|
|
When you use the window.open method the second parameter is the target, and you can't name the parameters in a function call.
Response.Write("window.open('VisorFicheros.aspx?Id=" + gridView.SelectedRow.Cells(1).Text + "','_blank');")
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
|
If I put _blank I don't see diferent.
My first problem is that I don't want to use javascript, I want to use only vb.net (asp.net) and my second problem is that when I see that with response.redirect I can't open a new page I have that use javascript with windows.open, with it i can open a new window for me is not necessary the attrib _blank, this is not my problem my problem later with windows.open are 2 the firs and more important is that I.E block my page because is a pop-up, I can't say to all users that unblock it because this is internet I need to give a solution by code that not depend of user. My second problem with windows.open is that sometime the focus is lost and I see my main page and not my new window (I can see it if I tabulate).
Thanks for your help.
|
|
|
|
|
There is no other way to open a new window other then any client side script. You have to use either Javascript or vbscript.
|
|
|
|
|
Hi ,
I want to show my errore message also other message
by meaage box in asp.net c#..
how can i do it please inform me details.
Thanks
fatema
|
|
|
|
|
hi
R u using Validation summary?.
i think it is useful for u.
|
|
|
|
|
use ASP.Net Validation Summary. This[^] Will Help You !!
cheers,
Abhijit
|
|
|
|
|
I would say you need to buy a book on ASP.NET. As for your specific question, you would use javascript, or perhaps something in ASP.NET that emits js ( like the validation summary others have pointed to ). alert is the javascript method to show a message box.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Its possible to use third party controls in vs2003?,
Mean i want to use infragistics controls in my vs2003 project,
but i cant able to add those controls in my control toolkit,
Thanks & Regards,
Member 3879881,
please don't forget to vote on the post
|
|
|
|
|
hi
some of third party controls need newer version.
like AJAX toolkit.
bye.
Mohammad Khansari
|
|
|
|
|
Any toolkit that you try to use, will need a .NET 1.1/VS 2003 version for you to use it. Why are you living in the dark ages ?
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|