|
wt i want is i want to give user setup and when he run setup there, code files(.cs Files) of my pages shd not be copied. like if i have ABC.aspx it always has ABC.aspx.cs(this file shd not be coppied). please tell me how can i make setup of it.
|
|
|
|
|
can we stop window.open on page refresh event... because if i refresh then also this code is executing...
Sorry I am repeating my question..
Thanks in advance
Yrishi
|
|
|
|
|
yrishi wrote: Sorry I am repeating my question..
Yes, you are. And the answers are not going to change.
1 - window.open is not a solution
2 - an AJAX call is more reliable
3 - even that is not going to work 100% of the time
4 - therefore, most of the pages on the web find other ways to deal with this.
Asking the same question and expecting a different answer, is not really terribly bright.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Thanks for quick reply..
you mean to say that AJAX call is also not 100% sure solution(as your point no 2 and 3)
Please update me
|
|
|
|
|
Yes, I told you that last time. If someone closes the browser, rather than goes to another page, I'm not sure if the event fires. Either way, you can't be sure someone's computer didn't just crash, right ?
Like I said last time, your solution is to fix your code, not to look for something that does not reliably exist.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
|
Hy all
I have got the code of sending email but I have got problem in smtp
so i have a problem
please help me its urgent
best regards
MADAN LAL
MADAN LAL
|
|
|
|
|
Please explain what problem you are getting?
|
|
|
|
|
choudhary2010 wrote: but I have got problem in smtp so i have a problem
What problem are you getting ? Did you configure you SMTP Server?
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
choudhary2010 wrote: please help me its urgent
Weird
1 - it's not urgent for us at all
2 - if it's so urgent why don't you give any meaningful info, and don't answer when people ask for it ? I guess it's not urgent for you, either ?
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
I think we should change the meaning of 'URGENT' in our dictionaries cause whenever person mentions that its urgent to him, he didn't respond to helpers.
|
|
|
|
|
It's value is known in this context. It means, "I badly need someone to give me a copy and paste solution, because I don't know how to do my job. I won't respond to anything else, as I won't understand it"
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
I have made a page with a couple of radio buttons that people select either yes/no - and then 'submit' their answers via a button. I have on this button - this code:
If opt_A21_no.Checked = True Or opt_A22_no.Checked = True Or opt_A23_no.Checked = True Then
pnl_A2.visible = true
Response.Redirect("know_customers_A2.aspx#customers")
End If
If opt_A21_yes.Checked = True And opt_A22_yes.Checked = True And opt_A23_yes.Checked = True Then
Response.Redirect("know_customers_A3.aspx")
End If
The response.redirect in the first if/then statement goes to an anchor in the panel - but does not work - this is somehow due to the fact that the panel is not visible - is there a way around this?
If they answer no - I want to bring up the panel and then send them directly to the appropriate anchor in the panel.
Thx, Tammy
|
|
|
|
|
I think doing a redirect resets the page. You will lose the user input.
Try
pnl_A@.Focus();
|
|
|
|
|
Can I use something else to direct to a url other than response.redirect?
T
|
|
|
|
|
widget1 wrote: The response.redirect in the first if/then statement goes to an anchor in the panel - but does not work - this is somehow due to the fact that the panel is not visible - is there a way around this?
As someone else said, redirect removes all viewstate. If you want to redirect, you need to put something on the URL to tell you what panel to show, and write code to read the query string and show the panel accordingly.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Hello all!
Although I have followed Codeproject for awhile, this is my first post...from what I remember anyways.
Ok, so here's my issue, I am working on an Asp.net MVC page (C# is my language).
Everything is going well, however I need to pass some string values to my controller
to generate a search result page. Everything (logistically) works correctly.
The problem is that it is only drawing null values from the textboxes on the page and
passing them through the actionlink, through the routing table, to the controller action.
For the life of me, I cannot figure out why this is happening...so if someone could help
me out I would IMMENSELY appreciate it =D I'm going to post my page code now and hang
out with the wifey, I will check back periodically over the next day. Thanks in advance!!
This is the page
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
Home
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<form id="form1" runat="server">
<h2>Home</h2>
<p>
<asp:Table ID="Table1" runat="server">
<asp:TableRow ID="rowDetails" runat="server">
<asp:TableCell ID="cellDetails" runat="server" ColumnSpan="4">Welcome to the LumeTix Weekly Reporter! Use the search below to locate and view or edit a Report. Otherwise, click "Create New" to create a new report!</asp:TableCell>
</asp:TableRow>
<asp:TableRow runat="server">
<asp:TableCell runat="server" ColumnSpan="4">
<%= Html.ActionLink("Create New", "Create") %>
</asp:TableCell>
</asp:TableRow>
<asp:TableRow runat="server">
<asp:TableCell runat="server" ColumnSpan="1">Filter By Last Name:</asp:TableCell>
<asp:TableCell runat="server" ColumnSpan="1">
<asp:TextBox runat="server" ID="lastname" />
</asp:TableCell><asp:TableCell runat="server" ColumnSpan="1">Filter By Date:</asp:TableCell><asp:TableCell runat="server" ColumnSpan="1">
<asp:TextBox runat="server" ID="date" />
</asp:TableCell></asp:TableRow><asp:TableRow runat="server">
<asp:TableCell runat="server" ColumnSpan="4">
<%=Html.ActionLink("Search!","Results", new { ln=lastname.Text , d=date.Text}) %>
</asp:TableCell></asp:TableRow></asp:Table></p></form></asp:Content>
This is from my global file
public class MvcApplication : System.Web.HttpApplication
{
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.MapRoute(
"Results",
"{controller}/{action}/{lastname}/{date}",
new { controller = "Home", action = "Results", ln = "", d = "" }
);
routes.MapRoute(
"Default",
"{controller}/{action}/{id}",
new { controller = "Home", action = "Home", id = "" }
);
}
and This is from my Controller
public ActionResult Results(string ln, string d)
{
Filter filter = new Filter();
filter.Date = d;
filter.LastName = ln;
if (!ModelState.IsValid)
return View();
filter.SetFilters();
return View(XMLFiler.ReportSearchResults(_db.reportSet.ToList(), filter));
}
modified on Wednesday, October 21, 2009 8:36 PM
|
|
|
|
|
Check the paraeter names on the action method. I've found that if they don't match the names from the routing table it doesn't work
only two letters away from being an asset
|
|
|
|
|
Yea, I made sure that the parameters are all ln and d , respectively. My guess is that I'm messing up passing from an asp.net textbox control to the actionlink... not sure how i could be screwing this up though... Something so simple, yet driving me crazy. Not sure why i'm getting null either, should at the worst be an empty string value...
|
|
|
|
|
Hello,
I want to use a web framework for ASP.net application.Could any one suggest which one will be good for small applicaiton for which I want to improve look and feel of pages by using web application framework.
Any suggestion.Plz
thanks
|
|
|
|
|
bam_usic wrote: I want to improve look and feel of pages by using web application framework.
Web Application Look and Feel is nothing to do with the Framework that you are using. Its all about the CSS and Themes that you are using for the site. Other than CSS you can look into SilverLight or Flex To develop your web site.
bam_usic wrote: I want to use a web framework for ASP.net application
bam_usic wrote: or small applicaiton
You can have a look into DNN ( DotNetNuke) . Which is an Open Source .
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
I'm having quite the bizzare issue. I created a page a while ago which validates my form using javascript and if everything looks good, then it issues a post back passing the 'submit_button' as the posting control and 'validated' as the argument. This works just fine, however I copied the page to a new form and made some slight modifications to the javascript, images, and layout on the page, however both pages are using the same "validate_form" function but the new page that I copied over always throws the "invalid post back or callback argument". I've scoured the net for the better part of this day and have come across the clientscript.RegisterForEventValidation method but cannot seem to get that to work. But...again what is bizzare is why it's not giving me this error on the first page I made months ago as there's no code disabling the validation for the page.
I've tried this so far, but still get the error:
protected override void Render(HtmlTextWriter writer)
{
this.ClientScript.RegisterForEventValidation("submit_button", "validated");
base.Render(writer);
}
What's also weird is when I debug on the Page_Init event, I can look at the live "Validators" collection but even after the RegisterForEventValidation() executes, I still get a collection count of zero. Am I looking in the wrong place?
Thanks!
Knowledge is not power, however, the acquisition and appropriate application of knowledge can make you a very powerful individual.
|
|
|
|
|
Ah, after looking at this http://forums.asp.net/t/945348.aspx I did find that it's a drop down list control causing the error. The control appears to be alright, but because I'm adding option values using javascript that's what's causing the invalid argument error. I'm still curious if there's a way using the debugger I could have found out which "argument" or control post back was causing the error quicker. Anyone have any suggestions?
Thanks!
Knowledge is not power, however, the acquisition and appropriate application of knowledge can make you a very powerful individual.
|
|
|
|
|
I need to validate date in textbox using javascript..
The date is must be not greater than TODAY date and not less than before 3 months ..If either of these conditions is fails will show the prompt message..
please any body help
|
|
|
|
|
What you have tired till now ?
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|