Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
M

MrMicrosoftvn

@MrMicrosoftvn
About
Posts
15
Topics
7
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Catching the content of DataGrid at runtime
    M MrMicrosoftvn

    thanks for yr replying, before posting my problem i tried to use the ItemDataBound event so that i can not catch my content at runtime.

    ASP.NET help database docker

  • Catching the content of DataGrid at runtime
    M MrMicrosoftvn

    Hello, here is my source for catching the content of DataGrid: <%# DataBinder.Eval(Container.DataItem, "Thread_Content") %> and here is my code-behind: private void Page_Load(object sender, System.EventArgs e) { ThreadsList.DataSource = CreateDataSource(); ThreadsList.DataBind(); } // The ItemCreated event (of the DataGrid control) occur when an Item is created private void ThreadsList_ItemCreated(object sender, DataGridItemEventArgs e) { if (e.Item.ItemIndex != -1) { // the Thread_Content column has the index is 2 ((DataRowView)e.Item.DataItem).Row["2"] = ((DataRowView)e.Item.DataItem).Row[2].ToString().Replace("\n", " "); } } above is my source to catch the content of the column Thread_Content at runtime to replace any "\n" to "
    " before they bind to the control so that it will make my thread content break line. And here is my problem: at the first time when loading the page (IsPostBack return false), the source work fine, it does not have any error. But when IsPostBack return true, for instance I click the delete button in DataGrid to delete a row, i get the error: "Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.", the error occur at the line: ((DataRowView)e.Item.DataItem).Row["2"] = ((DataRowView)e.Item.DataItem).Row[2].ToString().Replace("\n", "
    "); That is!!! I can not understand the reason, anyone can help me, plz show me a way. Thanks a lot !!!:):)

    ASP.NET help database docker

  • upload image in ASP.NET
    M MrMicrosoftvn

    hello, i want to allow my users upload image in my site. How can i check that whether the file uploaded by users is an image or not, the dimensions is equal 15px (width = 15px; height = 15px), and the size is less than, for instance 500KB ? Thanks for yr answer.:)

    ASP.NET question csharp css asp-net

  • Unicode data
    M MrMicrosoftvn

    hello, I get a problem to have you help me. Here is it: when i create a new article and get its content to show in the browser for my users, it can be read. After that, i get it back (its content) into textarea form to edit and click the AcceptChanges button to save my changes and store it back into the database (MS SQL 2000) (the data is saved into ntext field of MSSQL). Then i get it back again to show in the browser for my user, the content is not normally and my users can not read it. Please show me some way. My content is Unicode Data (Vietnamese) and saved in ntext data type. Thanks for your answer.

    ASP.NET database help sql-server

  • Redirecting to another page via button
    M MrMicrosoftvn

    use window.location in your javascript to redirect

    ASP.NET tools question

  • bind data in ASP.NET
    M MrMicrosoftvn

    yes, i can not use "DataBind" directly to bind my data to DropDownlist in that case. Well, i will try yr way. Thanks !!!

    ASP.NET question csharp html asp-net wpf

  • bind data in ASP.NET
    M MrMicrosoftvn

    thansk for you answer but i think you read my question carelessly. That does not solve my problem and not that i got

    ASP.NET question csharp html asp-net wpf

  • bind data in ASP.NET
    M MrMicrosoftvn

    Hello, I get a problem in my project when binding data from the DataSource. Here is it: Well, i have 2 tables as below: Categories: ============== CategoryID CategoryName Products: ============== ProductID CategoryID ProductName That is, now i would like to bind data so that i get the HTML Source like this: <select name="Product"> NameOfFirstCategory NameOfFirstProductInTheFirstCategory NameOfSecondProductInTheFirstCategory NameOfSecondCategory NameOfFirstProductInSecondCategory NameOfSecondProductInSecondCategory my question is that is there available control that can do that or what ASP.NET server control should i use ? and ... plz show me a code example of it. thanks a lot !!!

    ASP.NET question csharp html asp-net wpf

  • Regex !!!
    M MrMicrosoftvn

    well. the example above is just simple. That i want to do is the way that some forum had done.

    ASP.NET regex question csharp asp-net

  • Regex !!!
    M MrMicrosoftvn

    yes, i want to find that whether the Regular Expression match the value of textarea to make the text be bold

    ASP.NET regex question csharp asp-net

  • Regex !!!
    M MrMicrosoftvn

    hello, imagine that my textarea have the value: [b]hello[/b] now i want to "translate" it into hello to make the text be bold. How can i do that with ASP.NET ? and where should i find those Regular Expression ? Does the Snizt Forum have them ? Thanks a lot !!! :)

    ASP.NET regex question csharp asp-net

  • how to store a value in cookie ???
    M MrMicrosoftvn

    thanks for your answer :) :)

    ASP.NET question csharp asp-net tutorial

  • how to store a value in cookie ???
    M MrMicrosoftvn

    I have a login form, and when my users click on the login button to log in my site, i want to create a cookie that store UserID, UserName ... and some information of user. How can i do that in ASP.NET ??? Thus, how can i read the value when cookie is already created ??? Thanks for your answer.

    ASP.NET question csharp asp-net tutorial

  • Reference to form ???
    M MrMicrosoftvn

    thanks for your answer. My friend give me the way to resolve that. By using Javascript, we can rewrite the action value of the form as below: function RewriteAction() { document.Form1.action = "onepage.aspx"; } and when the click event of the button (OnClick event) occur, the function will be called and it will do rewrite the action value.

    ASP.NET question sysadmin tutorial

  • Reference to form ???
    M MrMicrosoftvn

    Hello, In my CodeBehind, how can i get reference to the form tag with attritute runat="server" ???. For example, in my aspx file, i have a form below:

    the question is that how can i get reference to this form to set the attritute action="onepage.aspx" at run time ? I cant do that before. Thanks for yr replying.

    ASP.NET question sysadmin tutorial
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups