You are on page 1of 9

Limit no of characters that occur in a string

HyperLink myLink =
(HyperLink)e.Row.Cells[2].Controls[0];
string text = myLink.Text;
if (text.Length > 10)
{
myLink.Text = text.Substring(0, 10);

}
https://www.youtube.com/watch?v=Ygr6Sq5IRiA
http://forums.asp.net/t/1717606.aspx?
Popup+Message+Box+in+asp+net+c+
http://forums.asp.net/t/1594687.aspx?
Putting+A+Value+From+TextBox+to+Sql+Query

Document viewer

string checkUser = "SELECT count(*) FROM ClassListsTable


WHERE Group_Code =('" + TextBoxGroupCode.Text + "')AND
( StudentName='" + TextBoxName.Text + "')";

http://www.myaspweb.com/articals/chatpageA26.aspx

Chat room

http://www.codeproject.com/Tips/493405/Validating-UserInput-Containing-HTML-tags-in-ASP

For validation

using System.Text.RegularExpressions;

For regex

http://www.codeproject.com/Tips/173879/Load-allthe-Country-Names-of-the-World-in-DropDow

Add all countries to drop down box

<script>alert('Oops!')</script>

https://msdn.microsoft.com/enus/library/ff647397.aspx
https://www.owasp.org/index.php/Unrestricted_File_
Upload
http://www.codeproject.com/Questions/454188/Ho
w-do-i-solved-Timeout-expired-in-Asp-Net

security

http://www.codeproject.com/Questions/454188/Howdo-i-solved-Timeout-expired-in-Asp-Net

Highlight textfield

<tr>
<script src="jquery-1.11.3.js"></script>
<script type="text/javascript">
$(document).ready(function () {
$('INPUT[type="text"]').focus(function () {
$(this).addClass("focus");
});

$('INPUT[type="text"]').blur(function () {
$(this).removeClass("focus");
});
});
</script>
<style type="text/css">
.focus {
border: 2px solid red;
background-color: #FEFED5;
}

</style>

</tr>

By using trim() we can remove white space characters


from the beginning and end of a string.But to remove white
space characters in middle we cannot use trim() method.
we can easily remove the white spaces/empty space in a
string by replace method
string strSample = Test with white space;
strSample = strSample.Replace( , );
Result : strSample = Testwithwhitespace

https://www.youtube.com/watch?v=33sBZanzlII

Master page

https://www.youtube.com/watch?v=xvrr-gZ2UJQ

Add menu

int rowCount = GridView1.Rows.Count;


if (rowCount == 0)
{
GridView1.Visible = false;
}
else
{
GridView1.Visible = true;
}

Check if gridview empty

Embed video WPD800-56436-43532-24092


https://www.youtube.com/watch?v=vZIOI136IKY
https://www.youtube.com/watch?v=BqyAAGMfTD8
string pathString2 =
@"C:\Users\Shantell\Documents\Visual Studio
2013\WebSites\WebSite8\Users\" + TextBoxUn.Text;

https://www.youtube.com/watch?v=K7l1OGHNfeE
Edit and delete from gridview-good
Save image in database
Create folder called

System.IO.Directory.CreateDirectory(pathString2);

Immobilise
Purposehttps://www.youtube.com/watch?
v=ZeOyiEUy808

https://www.youtube.com/watch
?v=Ygr6Sq5IRiA
https://www.youtube.com/watch
?v=sd0grLQ4voU
http://www.csharpcorner.com/uploadfile/mah
esh/how-to-read-a-text-file-in-CSharp/

string SelectCommand= "Select * FROM [GroupName]"


UpdateCommand= "UPDATE [GroupName] Set
[Password]=@GroupPass=,[Form]=@Form,[Student]=@name
Where [id]= @id";

Free website

Open doc as html


Website design
Reading text files in c#

The methods of ckEditor

Re: how to save ckeditor data


into database?

http://docs.cksource.com/ckeditor_api/symbols/CKEDI
TOR.editor.html#insertHtml
https://www.youtube.com/watch?v=hs74fKPJpFw

creat a text file in c#

http://docs.cksource.com/CKEditor_3.x/Developers_
Guide/Integration
http://www.csharpcorner.com/UserRegistration/UserRegistration.
aspx?check=r&ReturnURL=%2fuploadfile
%2fscottlysle%2fword-processing-with-anextended-rich-text-box-control-in-vb%2f
http://menulab.com/richtextbox/documentation.asp
x
http://www.easyfreeware.com/find.php?
q=freeware+text+scroll+ocx+control
https://www.youtube.com/watch?v=Ct9EV5QT6Pk
http://menulab.com/richtextbox/

Integrate in website
Rich text editor with scrolbar

Methods of rich textbox


Add free controls
Richtext save
Adding richtextbox

Call one web page in another


Response.Redirect("weblocationlocation2/weba
pp2/default.aspx");
info between two web pages

2. Use Session.
Source page - Label2.Text =
GridView2.SelectedRow.Cells[1].Text;
string value = "uploads/" + Label2.Text;
Session["notelink"] = value; Destination page
(Session["notelink"] != null)
{
HyperLinkNotes.Text = "Download FILE";
HyperLinkNotes.Visible = true;

- if

Label1.Text = (string)Session["notelink"];
HyperLinkNotes.NavigateUrl = Label1.Text;

https://www.youtube.com/watch?v=mE3Qj4cI3Lc
https://www.youtube.com/watch?v=Dq0_ALqt0C0
http://www.dotnetfunda.com/articles/show/442/how-toget-the-values-of-selected-row-from-a-gridview-usingaspnet
~/uploads/Girl Scouts Amherst Camp Flyer (1).jpg
~/uploads/vbImportant suff.docx

WebSites\WebSite8\uploads\\GirlScoutsAmherstCampFl
yer(1).jpg
http://www.aspdotnetsuresh.com/2012/02/saveupload-files-in-folder-anddownload.html
<system.web>

Update in gridview
Upload multiple files-use
Get selected value in gridview

txtrowid .Text = Gridview1.SelectedRow.Cells[1].Text;


txtname .Text =
Gridview1.SelectedRow.Cells[2].Text;
txtmarks .Text =
Gridview1.SelectedRow.Cells[3].Text;

Increase file sze

<httpRuntime executionTimeout="9999"
maxRequestLength="2097151"/>
</system.web>

Insert Date into a textBox


Download a file
https://www.youtube.com/watch?v=yLgrR7wsV1Y
https://www.youtube.com/watch?v=yLgrR7wsV1Y
http://www.codeproject.com/Articles/1757/FileUpload-with-ASP-NET

TextBox2.Text = Date.Now()

https://www.youtube.com/watch?v=RtgveiamSYE

Fileupload code explained

Log in to yahoo at click of button


https://www.youtube.com/watch?v=KVlXccl-XBA
https://www.youtube.com/watch?v=KIZqQgqYCIg
https://www.youtube.com/watch?v=Nu_zREtF_X8
https://www.youtube.com/watch?v=hFy35XK6E6s
Autonumber in sql

https://www.youtube.com/watch?v=9EJXzWasTq4
Create data base for website
Connect to database
Generate GUID
Store doc in sql
1. CREATE TABLE NorthWindUsers
2.

(UserID INT IDENTITY(1,1) NOT


NULL,

3.

UserName VARCHAR(50) NOT


NULL,

4.

Password VARCHAR(50) NOT


NULL)

SqlConnection con = new SqlConnection(strConnString);


5.
con.Open();

for (int i = 0; i < DropDownList1.Items.Count; i++)

if (DropDownList1.Items[i].Selected == true)

str = "insert into employee1 values('" +


DropDownList1.Items[i].ToString() + "')";

com = new SqlCommand(str, con);

com.ExecuteNonQuery();

Response.Write("<script>alert('Items
Inserted');</script>");

}
http://dotnetawesome.blogspot.com/2013/11/how-toupload-multiple-file-with.html

Upload files to server

https://www.youtube.com/watch?v=MHLlin5g5yQ