|
Hi ..
am getting error like this..can anyone help..in my pageload there is no errors ..only 1 error from aspx page
Error:does not contain a definition for 'ddlYear_SelcetedIndexChanged'
<%@ Register TagPrefix="users" TagName="YearDropdownList" Src="~/UserControls/YearListBox1.ascx" %>
.aspx
<td width="80" align="left"><users:YearDropdownList ID="ddlYear" runat="server" ToolTip="Select a Year" OnSelectedIndexChanged="ddlYear_SelcetedIndexChanged" /></td>
.aspx.cs
<asp:DropDownList ID="ddlYear" runat="server" Enabled="true" Width="75px" AutoPostBack="true" CssClass="dropdown" ToolTip="Select a Year." OnSelectedIndexChanged="ddlYear_SelectedIndexChanged" />
pageload:
protected void dd1Year_SelectedIndexChanged(Object sender, EventArgs e)
{
sYear = ddlYear.SelectedValue.Trim();
}
|
|
|
|
|
Why do you show us the 'register' part ? Is the event inside the control's .cs file ?
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
You mean Usercontrol .cs file..Yeah i wrote my method in usercontrol..i am calling stored procedure in usercontrol to display list of years..
|
|
|
|
|
I notice you use Object instead of object, but I'm not sure that should matter. Other than that, I see no reason, if the control is in usercontrol.aspx and the event is in usercontrol.aspx.cs, for there to be an issue.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
Have you copy and pasted the code snippets and the error message? I ask because the method name in the error message doesn't match those in the code.
|
|
|
|
|
Hello, Not sure if this is the correct place to ask this question but I'll give it a shot...
I have a need that perhaps one of you can point me in the right direction with...
I would like to implement something very similar to what’s out on www.target.com or www.gap.com.
When you click a button (quick view, quick info, etc..) you get a new window with product pics and info.
Here's the link:
http://www.target.com/Star-Wars-Clone-Favorite-Characters/b/ref=nav_t_spc_10_23/184-2346213-9435346?ie=UTF8&node=673254011...(and click on "Quick Info" under any image)
Perhaps I can do this with a widget or something else but I’m not sure what kind of widget it would be. I believe it's done with Ajax!
If someone could provide "ANY" useful information, it would be “GREATLY” appreciated
Thank you in advance,
~Mario
|
|
|
|
|
I would suggest that you need to do some reading. I don't believe you have any idea what AJAX is or does. This COULD be done with AJAX, but as it's just a popup window, that appears wasteful to me. However, the ASP.NET AJAX library probably does have a control for this sort of thing, it seems like it's a styled div, which would mean it's sitting on top of a transparent div, to stop interaction with the stuff underneath. You could use AJAX to request the script, or you could push the script down with the page, ultimately, this is done with javascript. You can probably right click on the page and view source, and probably open some include files, to find the script that does it, but it sounds like you should focus on some more basic stuff, first.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
~I don't believe you have any idea what AJAX is or does.~
That is why I was asking, duh!! Anyway, I figured out on how to do it is by using a ModalPopup window. Thanks for the info and vote of confidence...
|
|
|
|
|
CSharpBeginner wrote: ~I don't believe you have any idea what AJAX is or does.~
That is why I was asking, duh!!
Well, I guess my point is, if you use things you don't understand, then you're going to run into issues.
CSharpBeginner wrote: Anyway, I figured out on how to do it is by using a ModalPopup window
Yeah, that makes sense. The point tho, is that if you use stuff you don't understand, you will get in trouble.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
the user must first enter a value then click enter...This redirects the user to an internal search engine page written in javascript. i want the value to display in the internal search engine text box. I can get it to redirect but I get the error 'txtSearch2 is not part of _Default Class' in the code behind.
Me.txtSearch2.Text = Request.QueryString("Name")
if you need more info please let me know!!!!!
|
|
|
|
|
is the textbox a user control ?
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
yes I will paste the code and the error .....
Page 1 user enters word in textbox then clicks search..this word is then passed to a Internal Javascript search engine....
asp/vb.net code
<asp:TextBox ID="txtSearch" runat="server" /><asp:Button ID="btnSearch" runat="server" Text="Search" CausesValidation="False" />
code behind
Dim p1 As String = Me.txtSearch.Text.Replace("&", "%2")
Dim sln As String = (("SearchSite.aspx?Name=") + p1)
Response.Redirect(sln)
Page 2 - value is passed to search engine and user hits search and results display
<b>asp/vb.net code</b>
<input type = text name ="txtSearch2" value="" maxlength=40 id="txtSearch2" language="javascript" onclick="return Text1_onclick()">
<input type = submit name="go" Value="SEARCH" onClick="search()">
Code behind
Partial Class _Default
Inherits System.Web.UI.Page
Protected txtSearch2 As System.Web.UI.HtmlControls.HtmlInputControl
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim txtSearch2 As HtmlInputHidden
txtSearch2.Value = Request.QueryString("Name")
For Each s As String In Request.QueryString
Response.Write(Request.QueryString(s))
Next
End Sub
Cod
|
|
|
|
|
HistoricalSocietyMember wrote: yes
HistoricalSocietyMember wrote: input type = text name ="txtSearch2" value="" maxlength=40 id="txtSearch2" language="javascript" onclick="return Text1_onclick()"
um.... no. The answer is no. you need a runat="server" for this to be aserver control. Why not just use an ASP.NET textbox ?
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
I get an error when I create the <asp:textbox> control. it says search() is not a recognized member the .aspx page....The search engine is a Javascript search engine with the search() implemented in the javascript. Once the user hits the search button I wanted this to trigger the search engine preferably with the <asp:text> but the only way I can get it to work is with in the input text....This is a copy of my javascript search():
title = new Object();
desc = new Object();
links= new Object();
matched= new Object();
keywords= new Object();
found= new Object();
var temp=0;
// actual location or the item to be searched
// description of the location
// actual link
// percentage match found
// keywords as parsed from the input
// # of titles present in the database
title[0]=45
//no of keywords after parsing
keywords[0]=0
//no of matches found.
found[0]=0
<!-- Begin List of Searchable Items -->
<!--put the list of the links and descriptions here!!-->
<!-- list of the 45 Searchable items (deleted for security purposes)-->
<!-- End list of Searchable items -->
function search(){
var skeyword=document.searchengine.keywords.value.toLowerCase();
var check=1;
var pos=0;
var i=0;
var j=0;
var itemp=0;
var config='';
while (true)
{
if (skeyword.indexOf("+") == -1 )
{
keywords[check]=skeyword;
break;
}
pos=skeyword.indexOf("+");
if (skeyword !="+")
{
keywords[check]=skeyword.substring(0,pos);
check++;
}
else
{
check--;
break;
}
skeyword=skeyword.substring(pos+1, skeyword.length);
if (skeyword.length ==0)
{
check--;
break;
}
}
// the keywords have been put in keywords object.
keywords[0]=check;
// matching and storing the matches in matched
for ( i=1; i<=keywords[0];i++)
{
for (j=1;j<=title[0];j++)
{
if (title[j].toLowerCase().indexOf(keywords[i]) > -1 )
{
matched[j]++;
}
}
}
// putting all the indexes of the matched records in found
for (i=1;i<=title[0];i++)
{
if (matched[i] > 0 )
{
found[0]++;
// increment the found
found[found[0]]=i;
}
}
for (i=1;i<=found[0]-1;i++)
{
for(j=i+1;j<=found[0];j++)
{
if ( matched[found[i]]< matched[found[j]] )
{
temp= found[j];
found[j]=found[i];
found[i]=temp;
}
}
}
// end of sort
output = self;
output.document.write('<html>');
output.document.write('<head>');
output.document.write('<script>');
output.document.write('window.onerror=new Function("return true")');
output.document.write('<\/script>');
output.document.write('<title> Search Results </title>');
output.document.write('</head>');
output.document.write('<BODY bgcolor=#ffffff text=#000000 link=#990099 vlink =#339966 >');
output.document.write('<center> <h1> Search Results </h1></center>');
output.document.write('<hr>');
output.document.write(' The Keyword(s) you searched :: '.big() )
for (i=1; i<=keywords[0]; i++)
{
output.document.write( keywords[i].bold() +" ");
}
output.document.write('<br>');
if (found[0]==0)
{
//alert(found[0]);
output.document.write('<hr>');
output.document.write("<b>No matches resulted in this search </b> <br>");
output.document.write("You may close the results and reduce the length/number of the keywords <br>");
}
else
{
// data has been found
output.document.write(" <hr> <b> The Results of the search are : </b> ");
output.document.write( found[0] +" Entries found ".italics());
output.document.write("<table border=1 width=100%>");
for (i=1; i<=found[0];i++)
{
output.document.write("<tr><td valign=top bgcolor=#9999ff>");
output.document.write("<h3>" +i +"</h3>");
output.document.write("<td valign=top>");
itemp=found[i];
output.document.write(desc[itemp].bold() +"<br>" +
links[itemp].link(links[itemp])+"<br>");
temp= (matched[itemp]/keywords[0])*100
output.document.write("<i> Matched with keywords :: " +temp+" % </i>" );
matched[itemp]=0
}
found[0]=0;
output.document.write("</table>");
}
//output.document.write ('This search was created by © <a href="http:\\dutta.home.ml.org"> Satadip Dutta</a> 1997');
output.document.write ("<hr>");
//output.document.write ("<form><center>");
output.document.write("<center>Hit the refresh button to return to the search<center>");
//output.document.write ("<input type='button' value='Start Another Search' onClick = 'self.close()'");
//output.document.write ("<center></form>");
output.document.write ("</body></html>");
output.document.close();
}
this is the html input boxes
<form name="searchengine" onSubmit="search()">
<center>
Keywords:
<input type = text name ="keywords" value="" maxlength=40>
<input type = submit name="go" Value="SEARCH" onClick="search()">
<br>
<hr>
</center>
</form>
How can I implement the <asp:text> and still get the same results.....
Thanks for your time!!!!
|
|
|
|
|
Hi, what I need to do is to hide the links for some images and files in my website from the public, so they can't direct link to these images.
Can someone help me out eith this?
|
|
|
|
|
You can't hide links. You can write code which checks the referrer on a link, a http handler which all links to images pass through, and which reject them if the referring page is not your site. Request.UrlReferrer is the property you need to look into.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
I'm after a dead dog simple web project. Haven't programmed in a couple years and I just want to make a "Hello" type web based app using Studio. My VB skills are still there. Just need something simple.
Thanks for any help.
|
|
|
|
|
|
You can start here >>[^]
Education is not a way to escape poverty — it is a way of fighting it.
|
|
|
|
|
I want to set login timeout to 1 month and to do that somebody suggested me to write the following.
<authentication mode="Forms">
<forms timeout="43200">
And it was working as I wanted but when I uploaded my site to webserver, I just get logged out after 2 or 3 minutes idle. I asked 'em(web hosters) and they said you must use out of process session state. Okay then I added the following code in web.config
<sessionstate mode="StateServer"
="" stateconnectionstring="tcpip=127.0.0.1:42424" cookieless="false" timeout="20">
After that problem still persists...so my question is that why do login needs session ? why it does not set cookie at client side ?
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKQUFK[M`UKs*$GwU#QDXBER@CBN%
R0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
-----------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
Hi to all,
After publishing the site , the linkbuttons are not working. On mouse over it is showing this url:
javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("ctl00$ContentPlaceHolder1$DataCourses$ctl04$LnkSublinks", "", false, "", "Student_Information.aspx?cat_id=113", false, true))"
can anybody help me on this.
|
|
|
|
|
This is seriously considered rude.
You didn't even wait for some time and created a new user name to post the same question [^]you posted some time ago with another user name.
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Are they two differ members or ?
|
|
|
|
|
Hi Abhijit,
Yes, I am a different member at code project. The same error occured when i published the site. That's why, I posted the same topic here.
|
|
|
|
|
hi Manas,
You misunderstood me...the same problem occured when i tried to publish the site...i found this topic here at codeproject...I have just reposted the same topic using my profile. And thanx for the reply
|
|
|
|