Click here to Skip to main content
15,887,596 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
General.NET dependencies Pin
Anonymous15-Apr-05 0:38
Anonymous15-Apr-05 0:38 
GeneralRe: .NET dependencies Pin
Sebastian Schneider15-Apr-05 3:42
Sebastian Schneider15-Apr-05 3:42 
GeneralRe: .NET dependencies Pin
Luis Alonso Ramos16-Apr-05 19:09
Luis Alonso Ramos16-Apr-05 19:09 
GeneralLinker errors. Help, who knows Pin
lazarev14-Apr-05 21:58
lazarev14-Apr-05 21:58 
GeneralI learned... Pin
Giancarlo Aguilera14-Apr-05 8:49
Giancarlo Aguilera14-Apr-05 8:49 
GeneralRe: I learned... Pin
[Marc]16-May-05 14:47
[Marc]16-May-05 14:47 
GeneralFile Explorer control in .net CF Pin
NullPtrHK14-Apr-05 8:12
NullPtrHK14-Apr-05 8:12 
GeneralBC30390: 'webapplication1.webform1.searchwords' is not Pin
bibipopopopo14-Apr-05 1:28
bibipopopopo14-Apr-05 1:28 
<br />
<br />
<% @Import Namespace="System.Data" %><br />
<script language="vb" runat="server"><br />
  Dim searchword as String<br />
  Dim pls as New DataTable()<br />
<br />
  Sub Page_Load(sender as Object, e as EventArgs)<br />
    BuildDataStore()<br />
<br />
  	completeData.DataSource = pls<br />
	completeData.DataBind()<br />
  End Sub<br />
<br />
<br />
  Sub BuildDataStore()<br />
	Dim dr as DataRow<br />
	<br />
	pls.Columns.Add(new DataColumn("Results", GetType(String)))<br />
<br />
    dr = pls.NewRow()<br />
    dr(0) = "If only God would give me some clear sign! Like making a large deposit in my name at a Swiss bank."<br />
	pls.Rows.Add(dr)<br />
	<br />
    dr = pls.NewRow()<br />
    dr(0) = "Is sex dirty? Only when it's being done right."<br />
<br />
	pls.Rows.Add(dr)<br />
<br />
    dr = pls.NewRow()<br />
    dr(0) = "On the plus side, death is one of the few things that can be done just as easily as lying down."<br />
	pls.Rows.Add(dr)<br />
<br />
    dr = pls.NewRow()<br />
    dr(0) = "I took a speed reading course and read 'War and Peace' in twenty minutes. It involves Russia."<br />
	pls.Rows.Add(dr)<br />
<br />
    dr = pls.NewRow()<br />
    dr(0) = "To *you* I'm an atheist; to God, I'm the Loyal Opposition."<br />
	pls.Rows.Add(dr)<br />
<br />
    dr = pls.NewRow()<br />
    dr(0) = "Sex without love is an empty experience, but as empty experiences go, it's a pretty good empty experience."<br />
	pls.Rows.Add(dr)<br />
<br />
    dr = pls.NewRow()<br />
    dr(0) = "It's not that I'm afraid to die. I just don't want to be there when it happens."<br />
	pls.Rows.Add(dr)<br />
<br />
    dr = pls.NewRow()<br />
    dr(0) = "What if everything is an illusion and nothing exists? In that case, I definitely overpaid for my carpet."<br />
	pls.Rows.Add(dr)<br />
<br />
    dr = pls.NewRow()<br />
    dr(0) = "Interestingly, according to modern astronomers, space is finite. This is a very comforting thought-- particularly for people who can never remember where they have left things."<br />
	pls.Rows.Add(dr)<br />
<br />
    dr = pls.NewRow()<br />
    dr(0) = "Eighty percent of success is showing up."<br />
	pls.Rows.Add(dr)<br />
  End Sub<br />
  <br />
  <br />
  Sub BindData(strQuery as String)<br />
	searchword = strQuery<br />
	<br />
	Dim dv as DataView<br />
	dv = New DataView(pls)<br />
	dv.RowFilter = "Results LIKE '%" & Regex.Replace(searchword,"'","''") & "%'"<br />
	<br />
	SearchResults.DataSource = dv<br />
	SearchResults.DataBind()<br />
  End Sub<br />
<br />
<br />
	Function Highlight(Search_Str as String, _<br />
	                   InputTxt as String, _<br />
	                   StartTag as String, _<br />
	                   EndTag as String) As String<br />
<br />
	  Dim ResultStr As String <br />
	  Return Regex.Replace(InputTxt, "\b(" & Regex.Escape(Search_Str) & ")\b", _<br />
	           StartTag & "$1" & EndTag, RegExOptions.IgnoreCase)<br />
	End Function<br />
	<br />
	<br />
	Sub searchQuotes(sender as Object, e as EventArgs)<br />
	  BindData(SearchTerm.Text)<br />
	  SearchResults.Visible = True<br />
	End Sub<br />
</script><br />
<br />
  <style type="text/css"><br />
   .highlight {text-decoration: none;color:black;background:yellow;}<br />
  </style><br />
<br />
<form runat="server"><br />
	Text to Search: <asp:TextBox id="SearchTerm" runat="server" /><br />
	<asp:button runat="server" Text="Search Woody Allen Quotes"<br />
	      OnClick="searchQuotes" /><br />
	<p><br />
	<asp:DataGrid runat="server" id="SearchResults" AutoGenerateColumns="False"<br />
	    Visible="False" ShowHeader="False"><br />
	  <Columns><br />
	    <asp:TemplateColumn><br />
	      <ItemTemplate><br />
	        <%# Highlight(searchword, DataBinder.Eval(Container.DataItem, "results"), "", "") %><br />
	      </ItemTemplate><br />
	    </asp:TemplateColumn><br />
	  </Columns><br />
	</asp:DataGrid><br />
	<p><br />
	The Data Being Search<br />
	<asp:datagrid runat="server" id="completeData" ShowHeader="False" /><br />



I imported this code in Visual studio.net and change on click events and other thing that they have to change but
there is a problem ! Framework said that error BC30390: 'webapplication1.webform1.searchwords' is not
accessible in this context because it is 'Private'.

any idea ?




onezero@gmail.com
GeneralRe: BC30390: 'webapplication1.webform1.searchwords' is not Pin
MoustafaS17-Apr-05 5:10
MoustafaS17-Apr-05 5:10 
GeneralDynamic loaded Assembly attaching PDB file Pin
Paul Farry13-Apr-05 21:07
professionalPaul Farry13-Apr-05 21:07 
GeneralRe: Dynamic loaded Assembly attaching PDB file Pin
DaveKolb3-Oct-09 20:14
DaveKolb3-Oct-09 20:14 
GeneralRe: Dynamic loaded Assembly attaching PDB file Pin
DaveKolb3-Oct-09 21:04
DaveKolb3-Oct-09 21:04 
QuestionHow do I Get my Toolbox Back? Pin
Anonymous13-Apr-05 10:45
Anonymous13-Apr-05 10:45 
AnswerRe: How do I Get my Toolbox Back? Pin
MoustafaS13-Apr-05 15:13
MoustafaS13-Apr-05 15:13 
GeneralEditing XML Files Pin
13-Apr-05 9:42
suss13-Apr-05 9:42 
GeneralRe: Editing XML Files Pin
DavidNohejl15-Apr-05 3:20
DavidNohejl15-Apr-05 3:20 
GeneralExpose Properties Pin
Josue Avila13-Apr-05 9:16
Josue Avila13-Apr-05 9:16 
General.Net Remoting question - server activated objects Pin
i.chen13-Apr-05 4:09
sussi.chen13-Apr-05 4:09 
GeneralRe: .Net Remoting question - server activated objects Pin
S. Senthil Kumar14-Apr-05 20:53
S. Senthil Kumar14-Apr-05 20:53 
GeneralRe: .Net Remoting question - server activated objects Pin
Anonymous21-Apr-05 0:28
Anonymous21-Apr-05 0:28 
Generalerror when compiling 'System.Xml.XmlException' Pin
yunuskajee12-Apr-05 21:37
yunuskajee12-Apr-05 21:37 
GeneralRe: error when compiling 'System.Xml.XmlException' Pin
Kodanda Pani13-Apr-05 4:28
Kodanda Pani13-Apr-05 4:28 
GeneralRe: error when compiling 'System.Xml.XmlException' Pin
Dave Kreskowiak13-Apr-05 6:22
mveDave Kreskowiak13-Apr-05 6:22 
GeneralRe: error when compiling 'System.Xml.XmlException' Pin
MoustafaS13-Apr-05 15:18
MoustafaS13-Apr-05 15:18 
GeneralPopup Form Class Problems Pin
Chris Quick12-Apr-05 13:06
Chris Quick12-Apr-05 13:06 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.