|
I would say no
But everything is relative
Every head is a world
Alexei Rodriguez
|
|
|
|
|
Its just a different mindset since every postback reload the page. Also thier are some more technologies you need to know like AJAX and Javascript.
|
|
|
|
|
The main thing to understand, is what ASP.NET is, and what it does. It's just an engine for HTML, and each page gets loaded in memory in order to create one iteration of a page, then it gets reloaded the next time it's needed. If you understand that seperation, and that VB.NET can only generate script, it cannot run in the browser, then the rest is just a new framework to learn.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
|
So I've been looking at this for 2 days now. I've created a simple custom control, a button to fill a lable with the current time from the server. I've tried to inherit updatepanel and I've tried updatepanel as a composit control but no luck. I click on the button and nothing happens.
Here is the code if you think you can set me straight...
Imports System.Web<br />
Imports System.Web.UI<br />
Imports System.Web.Script.Serialization<br />
Imports System.Web.UI.WebControls<br />
<br />
<br />
Public Class FormFooter<br />
Inherits WebControl<br />
Implements IPostBackEventHandler<br />
<br />
Public Event Click As EventHandler<br />
Private _SM As ScriptManager<br />
<br />
<br />
<br />
Protected Overrides Sub CreateChildControls()<br />
<br />
<br />
MyBase.CreateChildControls()<br />
Dim parent As Control<br />
Dim container As Control<br />
If SM Is Nothing OrElse Not SM.EnablePartialRendering Then<br />
<br />
container = New Control<br />
parent = New Control<br />
<br />
<br />
Else<br />
<br />
<br />
<br />
<br />
Dim up As UpdatePanel = New UpdatePanel<br />
up.ID = "UpPan2"<br />
Dim trigger As AsyncPostBackTrigger = New AsyncPostBackTrigger()<br />
<br />
trigger.ControlID = ClientID<br />
trigger.EventName = "Click"<br />
<br />
up.Triggers.Add(trigger)<br />
container = up.ContentTemplateContainer<br />
parent = up<br />
End If<br />
<br />
Dim cmdUpdate As Button<br />
Dim lblUpdate As Label<br />
lblUpdate = New Label<br />
lblUpdate.ID = ClientID & "$txtTime"<br />
lblUpdate.Text = " N O W"<br />
<br />
<br />
cmdUpdate = New Button<br />
cmdUpdate.Text = "Add Time"<br />
cmdUpdate.ID = ClientID & "$cmdUpdate"<br />
<br />
<br />
container.Controls.Add(lblUpdate)<br />
<br />
container.Controls.Add(cmdUpdate)<br />
<br />
<br />
Controls.Add(parent)<br />
<br />
<br />
End Sub<br />
Private ReadOnly Property SM() As ScriptManager<br />
Get<br />
If _SM Is Nothing Then<br />
_SM = ScriptManager.GetCurrent(Page)<br />
End If<br />
Return _SM<br />
End Get<br />
End Property<br />
<br />
<br />
<br />
<br />
Public Sub RaisePostBackEvent(ByVal eventArgument As String) Implements System.Web.UI.IPostBackEventHandler.RaisePostBackEvent<br />
Select Case eventArgument<br />
Case "click"<br />
OnClick(New EventArgs)<br />
End Select<br />
End Sub<br />
Protected Sub OnClick(ByVal e As EventArgs)<br />
SM.RegisterDataItem(Me, "<h3>Sending data from click3</h3>")<br />
RaiseEvent Click(Me, e)<br />
<br />
End Sub<br />
<br />
<br />
End Class
|
|
|
|
|
How to display Crystal Report in asp.net2.0 using crystal report viewer.
sabarees
|
|
|
|
|
There is a virtual path(http://server1/files/test.xls). From asp.net web app, I have to redirect to above path. If test.xls does not exist in the path, I have to display unauthorized page. I tried using if (File.Exists(Server.MapPath(URL))) but it gives an error "it is not a valid virtual path".
------------------------------------------------------------
"The only true wisdom is in knowing you know nothing." --Socrates
|
|
|
|
|
You have to try check if exists file like this:
if (File.Exists("C:\\Directory\\FileName.txt")<br />
...
I Love T-SQL
|
|
|
|
|
Try this
if(File.Exitst(Server.MapPath("~/files/test.xls")))
{
Redirect to the path;
}
else
{
Redirect to Unauthorized page.
}
Server.MapPath append the specified path to root path.
ex: http://server1 say root path then in if contion check for the path
'http://server1/files/text.xls'
smile
|
|
|
|
|
hi all,
i need to read the content of table's cells in a web page. How i do it?
thanks
|
|
|
|
|
Obviously using javascript. The main thing is, you need to put some ids in the tags for the table, so you can use getDocumentById to find the table. Then you can iterate over it's children.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
|
|
I'm using HttpWebRequest and HttpWebResponse to query a remote server. I plan to load the returned xml into an XMLDocument, but the HttpWebRequest.GetResponse() method fails with a 403 "Forbidden" error.
I am able to get a response when I put my domain username and password as plain text into the request's Credentials member, but of course I'd like to avoid having that information in the application.
I thought that code along these lines (found at http://claytonj.wordpress.com/2006/09/04/run-code-under-the-iis-authenticated-user-context/)
would solve my problem:
using System.Security.Principal;
if (User.GetType() == typeof(WindowsPrincipal))
{
WindowsIdentity id = (WindowsIdentity) User.Identity;
WindowsImpersonationContext impersonate = id.Impersonate();
//perform tasks under the impersonated user
//*** ***//
//revert back to local ASPNET account
impersonate.Undo();
}
else
{
//user isn’t authenticated
}
But, I still get the 403 error. I think the impersonation is failing because the WindowsIdentity.ImpersonationLevel property is always "Impersonation." I think this needs to be "Delegation" to reach the remote server (I'm behind a firewall and corporate proxy), but the property is read-only so I can't set it.
My Question: What do I need to configure in order to get the ImpersonationLevel property to be of the TokenImpersonationLevel.Delegation type?
Let me know if this requires clarification.
|
|
|
|
|
Hello everyone, I've searched forums, articles, msdn, and google [which I bet many people who post here don't do often] and after hour and a half I'm still stuck. See if you can give me a hand.
Thing is I have a site with a web.sitemap, in my MasterPage I've got a Menu and a SiteMapNavigation control to act as breadcrumb. Here it is:
<code><siteMapNode title="Peticiones" url="" description="Gestión de Peticiones de Documentación">
<siteMapNode url="~/Peticiones/PeticionDocumentacion.aspx" title="Nueva Petición a GADSA" description="Nueva Petición a GADSA" />
<siteMapNode url="~/Peticiones/RecepcionDocumentacion.aspx" title="Recepción de Documentación" description="Recepción de Documentación">
<siteMapNode url="~/Peticiones/InformarIncidencias.aspx" title="Informar Incidencias" description ="Informar Incidencias"/>
</siteMapNode>
<siteMapNode url="~/Peticiones/UbicacionPeticiones.aspx" title="Ubicación de Peticiones" description="Ubicación de la Documentación que se ha solicitado." />
</siteMapNode></code>
My problem is that SitemapNode "Informar Incidencias". I delete this node from the menu once it is databound so users cannot click on it. It links to a form used to report erros, which is only accessed when needed so I don't want it to appear on the menu. Well, whenever I do <code>Server.Transfer("~/Peticiones/InformarIncidencias.aspx")</code> I'd like the breadcrumb SiteMapPath control to update to my current site location, but I haven't found any way to this, so my breadcrumb only updates when I click on some menu item.
Does anyone know a way so I can set the web application current location programatically?
Thanks in advance
Kazz
"Users are there to click on things, not think. Let the archs do the damn thinking."
|
|
|
|
|
hi
when i go to copy the website to ftp host ,,
I studied how to deploy ,, but when i try to copy to my new web site
I found that it's contail two dirctories ( data - wwwroot ),
I copid all my project files after that i go to test my amazing web loooooool ,, i founded nothing ,,,,
then i delete all files and try to copy all to wwwroot , i can't do it ,,
jooooo
|
|
|
|
|
hmm so have you uploaded to the server but no files are actually appearing? is that right?
|
|
|
|
|
thanks for you quick reply ,,,
it's appear , but when going to explorer to navigate ,, nothing ,,,
only the page coming soon
, i think that the folder wwwroot all files must be copied to it ,,
i use copy web site on dotnet 2005
when to open the wwwroot of the ftp host
it told me on another side that you haven't root dir
jooooo
|
|
|
|
|
Hi,
I tried to use:
string.Format("mailto:{0}?subject={1}&body={2}",to, subject, body);
in order to send mail from the default email client.
This is working excellent in local machine only...but when this application is hosted in a web server or IIS this is not working...
any suggestion??
Thanks.
|
|
|
|
|
Of course, u hav to definetly give mail-server Port in order to send mail form hosted server
|
|
|
|
|
This just should launch the local mail program. I don't see why it should not work when deployed on a server, b/c the client does the work, you're not actually sending any mail. Of course, you're not setting an address to mail to, that seems odd ???
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Maybe I should configure something in the server??
Does anyone use something like that?
I thought it should be trivial to send a mail from a web application !!?
I would appreciate more help,
thanks,
|
|
|
|
|
lune12 wrote: thought it should be trivial to send a mail from a web application !!?
The way you're doing it, it is. Why don't you specify who to mail it to ? What does 'does not work' mean ? We're being left in the dark here, as to what the problem is.
If you think the server needs to be configured, you're obviously missing what your code does. A mailto: tag simply opens a new email on the client PC, the server has no idea what is going on, nor does it contribute to the process.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi,
Of course I specify to who I mail (to is a variable that hold a mail address)
And I think that the syntax is OK as it work fine when the application runs on the localhost, but when I run it from the server it doesn't (is just do nothing!).
Is my problem clear now?
Any Idea?
Do you have a working examle.
Thanks,
Levana
|
|
|
|
|
Oh - I see. Sorry, I am trying to find a problem, but there plainly isn't one.
Have you looked at the HTML of the page to make sure it's being rendered as expected ? Where does 'to' come from ? Again, putting it on the server, makes no difference to a mailto tag. Something must be mangling it, for example, if 'to' comes from a setting that has not been properly deployed.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|