| Implementing Postback using Javascript in Asp .Net 2.0 |
|
 |
Index ‹ dotnet-framework-aspnet
|
- Previous
- 2
- WYSIWYG editor in asp.netMy customers want to customize their website (style sheets, simple
layout etc...). They want to do this using a web interface/admin
site. I am trying to develop this admin website or buy/license this
software. I think it comes under content management area as a WYSIWYG
tool. But I am not sure. My development platform is dot net
technologies. So I would like to do this using ASP.NET and other dot
net technologies. Is there a good book or articles or software
solutions you can recommend? Are there any hosting provider who offer
this in dot net technology? Please bear with me, I am not an expert
in this area.
Thanks for your suggestions,
Bharathi
- 3
- Which Page method will be called after all the controls Render methods have executedIs there any sequence diagram on the web that clearly shows in which
order all Page methods (load, render and so on) are being called
compared to the order the page's contained control methods are being
called by the asp.net enginge ???
To be more specific, the thing I currently am most interested in
understanding is from which method in the Page class you can know that
that the Render method of all aggregated controls have been called so
that you can use the result from the processing of those methods ???
( See code example below for an example of what I want to do, and the
question is from which eventmethod in the aspx page (Page class) I
know that the render method of the control has been executed )
Or is it maybe not even possible ?
Is maybe the Render method actually sending the html to the client as
a datastream over the internet while the method is being executed ?
As far as I have understood the asp.net, the render method in the
child controls are just building up a XHTML DOM tree while executing
it, and you can at some later stage even make the control's resulting
html not be sent to the client by setting the Visible property for the
control to false from the Page that aggregates the control.
namespace MyDLL {
public class MyControl : System.Web.UI.Control
{
private bool MyBool;
protected override void Render(HtmlTextWriter output)
{
// some code ....
if(something) {
MyBool = true;
}
else {
MyBool = false;
}
// some code ....
}
public bool isMyBoolTrue()
{
return MyBool;
}
}
}
The aspx-page using the control above:
<%@ Register TagPrefix="MyDLL" Namespace="MyDLL" Assembly ="MyDLL"
%>
<html><body>
<div runat="server" id="IDresult"></div>
<MyDLL:MyControl runat="server"
id="IDmyControl"></MyDLL:MyControl>
</body></html>
<script runat="server">
public void WHAT_NAME_SHOULD_THIS_METHOD_HAVE() // Page_Load ,
Page_Unload , "PostRender" ... ???
{
if(IDmyControl.isMyBoolTrue())
{
IDresult.innerText = "OK";
}
else
{
IDresult.innerText = "NOT OK";
}
}
</script>
- 3
- Using FileSystemObject in VB.NETI'm trying to write a little VB.NET script in an ASP.NET web page that will
create folders, move files, etc... pretty much everything you can expect to
do using the FileSystemObject library.
Is this possible in .NET?
If so, how do I do it?
I've tried:
Dim fso as new system.io.filesystemobject, but filesystemobject doesn't show
up in the Intellisense, nor does it work. I've included the scrunn.dll in
my project, but still no dice.
I'd rather not do the whole Server.CreateObject("FileSystemObject") method,
because then I lose the intellisense in my development environment... but if
you can point me to a good list of methods and properties, that might be the
way I have to go.
Thanks so much for your help,
- 3
- Deployment of WebServiceHello!
I have a asp.net application that uses a webService. I have made a
webService as a undependent project and than added the webRefernece in
MyApplication. When I was debugging it was working just fine. But now I want
to deploy it to the server and I get the error that the ....mywebservice is
null or not an object. How can I deploy it?
Thanks everyone
- 8
- Cannot connect MS Access with ASP.NETThis is a multi-part message in MIME format.
I want to know that do I need to install MS Access in the machine in order to use ASP.NET connecting to MS Access because I got error when connect to DB
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=big5">
<META content="MSHTML 6.00.2800.1264" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Verdana size=2>I want to know that do I need to install MS
Access in the machine in order to use ASP.NET connecting to MS Access because I
got error when connect to DB</FONT></DIV></BODY></HTML>
- 8
- ASP .net bug when changing stae of radio button..?Hi all,
I just came across the following situation. I have three radio buttons
within the same group name, next to each of them I do have a
textbox (total 3 radiobuttons, 3 textboxes). I start with one
Textbox with its ReadOnly property to be true next to the defaulted
radiobutton that is checked. Then, I define that my event handler
for the CheckedChange event should define the ReadOnly property false
next to the radiobutton that I just checked. That is switching from True to
False. The change does not take place. After re-compiling the whole solution
and refreshing the page, the status of the Textbos remains the same after
I change the status of the RadioButton. Here it is what I have.
Is there anything wrong?
private void InitializeComponent()
{
this.rbNAcontactYT.CheckedChanged += new
System.EventHandler(this.rbNAcontactYT_CheckedChanged);
.
.
}
private void rbNAcontactYT_CheckedChanged(object sender, System.EventArgs e)
{
NATelephone.ReadOnly = false;
NAEmail.Text = "";
}
Thanks,
Carlos.
- 9
- ImageMap's is missing the attribute property, what to do ?Hi,
Is there a way to catch the "onMouseOver" event on the hotspots of an
imagemap control?
I want to show a tooltip, when the mouse is over, and that seems very
hard since I can't add the javascript.
Are there any way this can be done ? I have searched google for the past
few hours ... with no results, that could be used.
A bugge one from: codeproject.com and this one:
http://forums.asp.net/p/1052636/1490534.aspx#1490534
But I need it from codebehind, so I can add the javascript from there
... the other thing would be to buggy to maintain.
Really hope there are a solution out there ...
best regards
Mikael http://syska.dk :-)
- 9
- problem related with file dialog boxhi all
I am using the file control now i want that when the user browse for file
only image files should be visible means I want to apply the filter
One way I have tried was added a accept="image/jpg,image/gif" kinda
but it dosent works
please let me know if any one can solve my proublem
thank in advance
bala
- 10
- Saving a web form as a documentHi,
I want to display a web form with a bunch of data displayed in a specific
format(already know how to do this). I want the client to enter a signature
code and I'll display his/her recorded signature from a .jpeg file (I think I
know how to do this also). What I would like to do then is to save an image
of the whole form in a database table (maybe in an image or text coulmn) and
be able to redisplay/print this at a later date.
Basically, this will be a workorder and an inspector will be signing off
that the work is done and this paperless record will need to be available as
proof.
Is there some way to stream all of the data that the client sees in the
browser into an html or xml stream and save that away in the database. Or
even save the screen image as a jpeg and put that in the database.
Thanks,
--
John
- 11
- AtlasHas anyone been playing around with the Atlas bits released this week
at the PDC?
Todd
- 11
- Can I use .manifest in ASP.NET for dependency controlHi,
I have 2 different versions of COM libraries (version 1 and version 2). They
both are allowed to exist in the system and the caller (.exe) uses .manifest
file to decide which version of COM libraray to call. This works fine if I
use C# to make a console app (.exe) to test.
Now, I need to call the COM library from ASP.NET and I follow the necessary
steps to do COM interop in .NET. But it always loads the default version and
I am not able to control ASP.NET with .manifest file to load the expected
version of COM library.
Does anyone know how to do this in ASP.NET?
Many thanks
- 13
- Two Worker Process running at onceI have been having a problem where two aspnet_wp are starting when I
view a web page I made. This has just started happening. If anyone
has had a problem like this I would like to know why this might be
happening.
- 16
- Debugging Custom MembershipProvider?So far, I am more than a little underwhelmed by the Membership API in ASPNET2, and the ASP.NET Configuration wizard in VS2005. The
latter is slow as a pig whenever it does anything. Oh well, at least it's given me a chance to brush up on my Spider Solitaire game.
In any event, I am trying to implement a custom MembershipProvider for a website. Why? Because the default one that gets created by
the supplied wizard is way over the top, in terms of the complexity of information it manages, for the website I'm building.
The problem is I haven't been able to figure out how to debug my custom MembershipProvider. I've configured the site so that the
ASP.NET Configuration wizard uses the custom provider, but whenever I try to create a new user it blows up. It does give me an error
message when that happens. However, since that message is badly formatted, and refers solely to ASP.NET Configuration wizard files,
it's not much help.
So...how do I debug a MembershipProvider?
- Mark
- 16
- JavaScript events and postbacksMy web form has one edit box, a button, a list box and a combo box.
When the button is clicked the text in the edit box is added to the
list box and the combo box. After the new text is added I want to
clear the text of the edit box and set focus back to the text box.
I setup the event here:
private void Page_Load(object sender, System.EventArgs e)
{
if (!IsPostBack)
{
btnAdd.Attributes.Add("OnClick", ECMA.SetFocus("txtNewItem"));
}
}
Relevant html output:
<input name="txtNewItem" type="text" id="txtNewItem" />
<input name="TextBox2" type="text" id="TextBox2" style />
<select name="cbItem" id="cbItem">...</select>
<input type="submit" name="btnAdd" value="Add" id="btnAdd"
OnClick="document.getElementById('txtNewItem').focus();"/>
<select name="lbItem" size="4" id="lbItem">...</select>
When I run the application the focus is not set as desired. What
appears to happen is the focus is set momentarily, then the postback
event fires and the focus shifts again.
My question is, how do you properly manage the client side focus
around the postback events?
TIA!
David Beardsley
- 16
- .Net using ASP.NETYou need to make the values (the link part) unique or you'll encounter that
problem. You might be able to accomplish this through a little trickery such
as:
<asp:dropdownlist id="DropDownList1" runat="server">
<asp:listitem value="http://www.gc.ca/">One</asp:listitem>
<asp:listitem value="http://www.gc.ca/?">Two</asp:listitem>
<asp:listitem value="http://www.gc.ca/#">Three</asp:listitem>
</asp:dropdownlist></p>
Ken
MVP [ASP.NET]
"Edwin A. Reyes" <email***@***.com> wrote in message
news:031e01c34b0f$0984b2f0$email***@***.com...
Hello,
The reason why I am e-mailing you is becuase I am going on
a project. I am using ASP.NET. The problem that I am
having is that I created a DropDownList and Loaded
different states. Each state has his own location and an
link to inform the user about that the location and what
provides.Now As long as the state does not share the same
link it work fine but if more than one state uses the same
link it goes back to last time it resgister that link into
memory.And the infomation is displayed fine but the
selection of the state does not stay.If you can help me
with this problem that will be great. Thanks in advance.
Edwin A. Reyes
|
| Author |
Message |
U3ViaQ

|
Posted: 2006-4-11 15:37:02 |
Top |
dotnet-framework-aspnet, Implementing Postback using Javascript in Asp .Net 2.0
Hello,
We had code working in ASP .Net 2.0 Beta 2. version where through client
side code in Javascript postback was called. We have ported the same in ASP
.Net 2.0 professional version. Now doing the same throws the following error.
Error Description: Invalid postback or callback argument.
Event validation is enabled using in configuration or in a page.
For security purposes, this feature verifies that arguments to postback or
callback events originate from the server control that originally rendered
them.
If the data is valid and expected, use the ClientScriptManager.
RegisterForEventValidation method in order to register the postback or
callback data for validation. Contact the Administrator.
Please help me finding teh solution for this.
Thanks,
Subi
|
| |
|
| |
 |
| |
 |
Index ‹ dotnet-framework-aspnet |
- Next
- 1
- Data grid columnHello,
i'm using datagrid control to fetch a greeting card Data, but i have a
problem in datagrid coulmn, all the greeting card images showing in one
Column but i want to show these in atleast 3 columns what technique i use for
doing that pls tell me.
thanks
- 2
- accessing code behind ..Iam having following hyperlink html on a aspx page
<asp:HyperLink id="HyperLink1" runat="server" Width="264px"
Height="24px" NavigateUrl='<%# CreateHyperLink %>'
>HyperLink</asp:HyperLink></TD>
where CreateHyperlink is a public function in code behind ...
but this function is not being called ...,
what i see on the rendered page is :
<a id="HyperLink1">HyperLink</a>
is it possible to acces code behind like this ?, any help would be
appeciated ..
tia
-ashish
- 3
- 4
- Style Sheet not getting applied to content pageI have a master page and a content page but the stylesheet isnt getting
applied like how it looks in visual studio design view.
The master page is defined like this:
<%@ Master Language="VB" CodeFile="MasterPage.master.vb"
Inherits="MasterPage" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
<title>Overbored.com</title>
<link rel="stylesheet" type="text/css" href="StyleSheet.css" />
</head>
<body>
<div id="wrapper">
<form id="Form1" runat="server">
<div id="header">
<span class="title">Overbored.com</span>
<span class="breadcrumb">Todo: Breadcrumb will go
here...</span>
</div>
<div id="content">
<asp:ContentPlaceHolder ID="MainContent" runat="server">
</asp:ContentPlaceHolder>
</div>
<div id="navigation">
<span class="title">Overbored.com</span>
<div id="Div1">
<asp:Menu ID="menu1" DataSourceID="SiteMapDataSource1"
runat="server"></asp:Menu>
<asp:SiteMapDataSource ID="SiteMapDataSource1"
ShowStartingNode="false" runat="server" />
</div>
</div>
</form>
</div>
<div id="footer">
<a href="http://www.overbored.com/Portal">http://www.overbored.com</a>
</div>
</body>
</html>
The content page is defines like this:
<%@ Page Language="VB" MasterPageFile="~/MasterPage.master"
AutoEventWireup="false" CodeFile="Login.aspx.vb" Inherits="Login" %>
<asp:Content ID="LoginContent" ContentPlaceHolderID="MainContent"
Runat="Server">
<div>
<asp:Login ID="Login1" runat="server" BackColor="#EFF3FB"
BorderColor="#B5C7DE" BorderPadding="4"
BorderStyle="Solid" BorderWidth="1px" Font-Names="Verdana"
Font-Size="0.8em"
ForeColor="#333333">
<TitleTextStyle BackColor="#507CD1" Font-Bold="True"
Font-Size="0.9em" ForeColor="White" />
<InstructionTextStyle Font-Italic="True" ForeColor="Black" />
<TextBoxStyle Font-Size="0.8em" />
<LoginButtonStyle BackColor="White" BorderColor="#507CD1"
BorderStyle="Solid" BorderWidth="1px"
Font-Names="Verdana" Font-Size="0.8em" ForeColor="#284E98" />
</asp:Login>
</div>
</asp:Content>
The style sheet is in the root folder and is called StyleSheet.css
/*
The below CSS file was built using samples + techniques described by
Rachel Andrew in her book:
The CSS Anthology: 101 Essential Tips, Tricks & Hacks
*/
/* Overall Page */
body {
margin: 0;
padding-bottom: 2em;
background-color: #FFFFFF;
color: #000000;
font-family: Arial, Helvetica, sans-serif;
border-top: 2px solid #3366CC;
}
/* Header Section */
#header {
border-top: 3px solid #3366CC;
border-bottom: 1px dotted #3366CC;
height: 3em;
}
#header .title {
font: 190% Arial, Helvetica, Georgia, "Times New Roman", Times, serif;
color: black;
background-color: transparent;
float: left;
margin-right: 2em;
margin-top: 0.3em;
margin-left: .8em;
}
#header .breadcrumb {
font: 90% Arial, Helvetica, Georgia, "Times New Roman", Times, serif;
color: #FFFFFF;
background-color: transparent;
float: right;
margin-right: 2em;
margin-top: 0.8em;
font-weight:bold;
}
#header a:link, a:visited {
color: #B51032;
}
/* Footer */
#footer {
position: absolute;
bottom: 0;
left: 0;
width: 100%;
height: 1.5em;
background-color: #3366CC;
color: #3366CC;
border-top: #778899;
text-align: center;
}
#footer a:link, #footer a:visited {
padding: 0.8em 1em 0.5em 1em;
color: #FFFFFF;
background-color: transparent;
font-size: 80%;
}
/* Navigation */
#navigation {
width: 200px;
top: 5em;
left: 1em;
width: 13em;
position:absolute;
font-family: Arial, Helvetica, sans-serif;
font-size:90%;
}
#navigation ul {
list-style: none;
margin: 0;
padding: 0;
}
#navigation li {
border-bottom: 1px solid #ED9F9F;
}
#navigation li a:link, #navigation li a:visited {
display: block;
padding: 5px 5px 5px 0.5em;
border-left: 12px solid #711515;
border-right: 1px solid #711515;
background-color: #B51032;
color: #FFFFFF;
text-decoration: none;
}
#navigation li a:hover {
background-color: #711515;
color: #FFFFFF;
}
#navigation ul ul {
margin-left: 12px;
}
#navigation ul ul li {
border-bottom: 1px solid #711515;
margin:0;
}
#navigation ul ul a:link, #navigation ul ul a:visited {
background-color: #ED9F9F;
color: #711515;
}
#navigation ul ul a:hover {
background-color: #711515;
color: #FFFFFF;
}
/* Main Content */
#content
{
margin-top:1em;
margin-left: 16em;
margin-right: 2em;
}
h1 {
font: 150% Arial, Helvetica, Georgia, "Times New Roman", Times, serif;
}
#content p {
font-size: 80%;
line-height: 1.6em;
}
In visual studio designer the content page looks right but when i run the
application the master page style is not applied. The content of the master
page is applied but not the style.
Please help!
- 5
- 6
- Permissions ProblemI am trying to determine a permission problem trying to write a text file
from one web server to another.
Here is the situation:
We have two domains in place one is Active Directory and the other is an old
NT4 domain. These two domains have a trust between them.
On a 2003 server I am using the file system object to write a text file to a
NT4 web server. The folder on the NT 4 server currently is shared with open
security with control for everyone on Domain1 and Domain2. The 2003 server's
worker process is running under a domain account that has full access to the
folder.
I am able to map a drive to the share from the 2003 box to the NT4 box while
logged in with an admin account of the 2003 box. I am also able to run a
.vbs script on the 2003 box that is able to place a text file on the NT4
box. Of course, I do believe that script runs and creates the file system
object as the logged in user of the 2003 box.
Now to the non-working part. On my asp.net and classic asp page I am unable
to write a text file from the 2003 box to the NT4 box at all. The virtual
server(s) that are serving the pages have anon security turned on and use
the IUSR_MachineName account. Since I have every permission imaginable added
to the folder on the NT4 box for both domains at full control. My theory is
that possibly the IUSR account is the account that is actually creating the
object and trying to place the text file. I only theorize this because I can
not place the text file and that account seems to be the only one w/o
permissions to that folder since it is a local machine account and not a
domain account.
So my real question here is if my theory is right and/or what exactly is
going on here. After spending much too long on this problem and feeling like
a noob I am at a loss as to what to try next. Any suggestion would be
greatly appreciated.
Thank you)
- 7
- How do I get actual error in Application_Error() web method?I have a web service running and occasionally my web method
Application_Error() is getting called.
How do I find out what the error really is?
I am not passed in any System.Exception object like in try/catch.
There has to be a way to identify the error when an error routine is
called.
Thanks.
- 8
- Crystal Report based on embedded MDFI'm new to this ASP.Net and SQL Express stuff...so please be gentle.
I'm trying to create a Crystal Report that will be based off of an
embedded SQL database. What would be the best Data Connection to use
that will see the MDF since it's not associated with any SQL Server?
- 9
- 10
- question on refreshHi,
I don't know if I'm just missing something obvious, but when running my app,
not matter what page I'm on, when I hit 'refresh' on my browser, it takes me
back to my homepage.
I'm using global.asax and webconfig to fire some session onstart events and
to set a few variables (connstring and such) and also for forms
authentication.
I don't think I modified anything to cause this.. I didn't notice the
problem till now, as I finally have enough of it completed that I can view
other pages (lol).
Any idea on what is causing this problem?
- 11
- 12
- hit IE back buttonHi there,
I am having a problem with my asp.net web pages. If user hit BACK button on
IE and then click some other web controls on the web page. the page goes to
blank page. Anyone has the solution for this?
Alan
- 13
- Crystal Report generationHi!
I have a requirement to generate crystal reports based on certain criteria
and then generate a PDF of the report. I am using a a blank Crystal report
and in code behind i am setting the data source property of the Report
document as a dataset.
But here i am getting a error "Access to the path is denied"
Access to the path "C:\DOCUME~1\<System
Name>\ASPNET\LOCALS~1\Temp\temp_55c8abf6-c77c-43c9-b0c1-63d258692add.rpt" is
denied.
Can anyone help me out. Or please suggest how to generate the same when
there is a dynamic data table which servers as a datasource for the Report?
Thanks in advance.
- 14
- Assign voice to page elementsI have an aspx page with some text boxes that run at the server. How can I
assign voice recognized through QA's and Semantic items to the text boxes?
- 15
- Need a pros helpI have a datagrid with 3 columns
Name quantity status
This grid is populated from a sqldatareader.
grid.datasource = datareader
grid.databind()
I now want to set the quantity column to a template column with a
dropdownlist. How can
I get the dropdownlist to be populated from the same sqldatareader but start
a count from 1 to the value of the
quantity field, so if the foll data is returned
testproduct 5 open
the dropdownlist will have
1
2
3
4
5
for the first row so on.
Thanks
|
|
|