Showing posts with label system. Show all posts
Showing posts with label system. Show all posts

Monday, March 26, 2012

newbie: PublicKeyToken

Hey

asp.net 2.0

Example PublicKeyToken:
type="System.Web.Security.SqlMembershipProvider, System.Web,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
How is a PublicKeyToken calculated?

perhaps some of you have a link to an article about the subject

Best Regards!

JeffThis is one of the better explanation you'll find on it:
http://www.c-sharpcorner.com/Code/2...enGenerator.asp
Karl
--
http://www.openmymind.net/
http://www.fuelindustries.com/
"Jeff" <it_consultant1@.hotmail.com.NOSPAMwrote in message
news:uXE1xTA2GHA.1132@.TK2MSFTNGP02.phx.gbl...

Quote:

Originally Posted by

Hey
>
asp.net 2.0
>
Example PublicKeyToken:
type="System.Web.Security.SqlMembershipProvider, System.Web,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
How is a PublicKeyToken calculated?
>
perhaps some of you have a link to an article about the subject
>
Best Regards!
>
Jeff
>
>

Friday, March 16, 2012

Newline in a multiline-textbox filled by a DataList?

I'm binding my Data to the Datalist like that:

// Opening standard XML text reader
System.Xml.XmlTextReader myXmlReader = new System.Xml.XmlTextReader(Server.MapPath("~/xml/guestbook.xml"));
DataSet myDataSet = new DataSet();
// Reading XML into a dataset
myDataSet.ReadXml(myXmlReader);
myXmlReader.Close();

// Bind data to the data list!
GuestbookData.DataSource = myDataSet.Tables[0];
GuestbookData.DataBind();

then I read it out like that:

<div class="author"><a href="http://links.10026.com/?link=http://<%# DataBinder.Eval(Container.DataItem, "url") %>" target="_blank"><%# DataBinder.Eval(Container.DataItem, "name") %></a> schrieb am <%# DataBinder.Eval(Container.DataItem, "date") %> </div>
<div class="text"><%# DataBinder.Eval(Container.DataItem, "entry_Text") %></div>

Now I'd like to translate NewLines a User made when he was writing a comment into <br>s because right now, such a text:

writing something

and something else

is shown as writing something and something else. (In just one line without the linebreak).

How to translate those breaks? Thanks!

Change:
<div class="text"><%# DataBinder.Eval(Container.DataItem, "entry_Text") %></div>
to:
<div class="text"><%# ReplaceCRLF(DataBinder.Eval(Container.DataItem, "entry_Text")) %></div>
and then have a function in your page called ReplaceCRLF:
string ReplaceCRLF(string val)
{
return val.Replace(System.Environment.NewLine, "<br/>");
}
-Brock

Thanks, that's working!

NewPageIndex error

Imports System.Data.OleDbImports fish.configuration1Public Class CheckReplyFeedbacksInherits System.Web.UI.PageDim dsAs DataSet#Region" Web Form Designer Generated Code "'This call is required by the Web Form Designer. <System.Diagnostics.DebuggerStepThrough()>Private Sub InitializeComponent()End Sub Protected WithEvents lbCRFBAs System.Web.UI.WebControls.LabelProtected WithEvents lbLoggerAs System.Web.UI.WebControls.LabelProtected WithEvents dtgCheckReplyFIAs System.Web.UI.WebControls.DataGrid'NOTE: The following placeholder declaration is required by the Web Form Designer. 'Do not delete or move it.Private designerPlaceholderDeclarationAs System.Object Private Sub Page_Init(ByVal senderAs System.Object,ByVal eAs System.EventArgs)Handles MyBase.Init'CODEGEN: This method call is required by the Web Form Designer 'Do not modify it using the code editor. InitializeComponent()End Sub#End Region Private Sub Page_Load(ByVal senderAs System.Object,ByVal eAs System.EventArgs)Handles MyBase.Load'Put user code to initialize the page here 'load_data()Dim config1As New fish.configuration1 ds = config1.load_data("select * from feedback") bind_data()End Sub Public Sub page_change(ByVal senderAs Object,ByVal eAs DataGridCommandEventArgs) dtgCheckReplyFI.CurrentPageIndex =e.NewPageIndex'load_data() bind_data()End Sub Private Sub bind_data() dtgCheckReplyFI.DataSource = ds dtgCheckReplyFI.DataBind()End SubEnd Class

hello, im doing a paging grid. may i know what is wrong with this code.. because the code in purple keep giving " NewPageIndex" is not a member of 'System.Web.UI.Webcontrols.DataGridCommandEventArgs'. what should i do?

jellyfied

I see 2 things here:

1. Your DataGrid must contain an attribute specifying which method to fire on the page index change event. You do that like this:

 <asp:DataGrid id="DataGrid1" OnPageIndexChanged="Page_Change" runat="server"></asp:DataGrid>
 
2. Your page_change method contains the wrong definition. This is the correct definition:
Protected Sub Page_Change(ByVal sourceAs Object,ByVal eAs System.Web.UI.WebControls.DataGridPageChangedEventArgs)

Hi
DataGridCommandEventArgs doesnt contain NewPageIndex. You are passing the wrong
event arguments. It should be DataGridPageChangedEventArgs as told by jstawski

Thanks


News System

I have been looking around for a News System for ASP .NET C#.
I have one but its for ASP this is my last hope can anyone help me or i will have to make my own.Well, I do beleive you migth find some third party components, but why would you use such components? It isn't that tough to work on a system of your own right?
Start with it and we are all ready to help you.
Regards