__avd 1,826

Use WebClient class methods to read the URLs.

__avd 1,826
Do I have to register them?

No. They are not activex (COM components).

Where am I supposed to put the downloaded dll files

In order to use VLC DotNet library in WinForm app, you have to add references of Vlc.DotNet.Core.Dll, Vlc.DotNet.Core.Interops.Dll and Vlc.DotNet.Forms.Dll files to the project.

__avd 1,826

VideoLan DotNet works perfectly for me.

 Dim cnt As New Vlc.DotNet.Forms.VlcControl
 cnt.Media = New Vlc.DotNet.Core.Medias.PathMedia("x:\file.mp4")
 cnt.Dock = DockStyle.Fill
 Me.Controls.Add(cnt)
__avd 1,826

What is the field type of kickoff?

If it is DateTime then $TodayDate as bindParam variable.

$STM->bindParam(':kickofftime', $TodayDate);
$STM->execute();
$rows  = $STM -> fetchAll(PDO::FETCH_ASSOC);
foreach($rows as $row) {
   ....
}
__avd 1,826
__avd 1,826

session?global variables?

No. You have to use Application object.

Post your code if possible.

__avd 1,826

You should have to create wrapper class to manage cookies and session data.

For example,

public class CookieWrapper
    {
       /* Username property */
        public static string Username
        {
            get
            {
                return GetCookie("Username");
            }
            set
            {
                SetCookie("Username", value, false);
            }
        }
        /* Role property */
        public static string Role
        {
            get
            {
                return GetCookie("Role");
            }
            set
            {
                SetCookie("Role", value,false);
            }
        }

        /* Create a cookie */
        public static  void SetCookie(string key, string value,bool persist)
        {
            HttpCookie cookie = new HttpCookie(key, value);
            if (persist)
                cookie.Expires = DateTime.Now.AddDays(15);
            HttpContext.Current.Response.Cookies.Add(cookie);
        }
        /* Read a cookie */
        public static  string  GetCookie(string key)
        {
            HttpCookie cookie = HttpContext.Current.Request.Cookies[key];
            if (cookie == null)
                return "";
            return cookie.Value;
        }
        /* Remove a cookie */
        public static void RemoveCookie(string key)
        {
            HttpCookie cookie = HttpContext.Current.Request.Cookies[key];
            cookie.Expires = DateTime.Now.AddDays(-1);
            HttpContext.Current.Response.Cookies.Add(cookie);
        }
    }

And to set Username (cookie)

CookieWrapper.Username = "user1";

__avd 1,826

The problem every data is showing at three times

Please review the query that is used to fetch result. Also verify the Links section of Data Source of CrystalReport designer.

__avd 1,826

Don't add columns that are already been added by Load method. Remove line #17 to 19.

__avd 1,826

You've to post exception stack trace and also include section of web.config in your post.

__avd 1,826

The System.Array is base/super class of array. Here you need to request a method : a.GetValue(0)

__avd 1,826

Use Servlet-centric design or select MVC Framework or URLRewriterFilter tool (just like Apache's mod_rewrite).

__avd 1,826

Whenever you post/submit the form, huge amount of data from client to server are sent and it exceed the 4 KB range(Default size of MaxRequestLength is 4 KB).

One possible cause would be improper use of "ViewState". May be you can turn off ViewState for GridView if you dont want to preseve the selection or something like that.

Secondly, your data-binding code (To populate dropdown) on page_load should be executed atmost once. You can use IsPostBack boolean property in page_load event:

public void Page_Load()
{
   if(!IsPostBack)
    {
     //populate DropDownLists
     }
}
__avd 1,826

Wrap your databinding code in page_Load handler,

protected void page_load()
 {
  if(!IsPostBack)
    {
     //databinding code
      }
 }
__avd 1,826

Change the file format to Excel.XlFileFormat.xlCSVWindows.

__avd 1,826

You can use Linq to Dataset:

Sample:

Dim arr() = dt.AsEnumerable().Select(Function(p)
                      Return New String(p("stdname") & "" & p("gender"))
                                    End Function).ToArray()

System.IO.File.WriteAllLines("c:\csnet\p.txt", arr)
__avd 1,826

Enclose date value within the pair of # (hash) if field type is Date type.

CrystalReportViewer1.SelectionFormula = "{sell.Date}>=#" & DateTimePicker2.Value & "#  and  {sell.Date}<=#" & DateTimePicker1.Value & "#"
__avd 1,826

You should have to change/set the Target Framework project property with .net Framework 3.5.

__avd 1,826

You're comparing references of string objects. Use String.equals() method to compare strings:

if(word.equals(d))
  //
else
 //
__avd 1,826

You may use indexer method of DataRowView to obtain selected column value.

Dim Equip As DataRowView = ListBox1.SelectedValue
Dim val1=Equip(0) 'Returns value from 1st column
__avd 1,826

The PlaceHolder control is used to stores dynamically added server controls on the Web page.

__avd 1,826

In order to prevent SQL-Injection and escape data, you must have to use parameterized SQL statement and do not call ExecuteNonQuery() method to fetch the value/data. You should have to use ExecuteReader() or ExecuteScalar() method.

One important suggestion : Always use "using" block. "using" block will call the "dispose()" method of ADO objects.

public static string surnameSelect(string Ssession)
  {
    string surname=string.Empty;
    using(SqlConnection cn=new SqlConnection())
     {
      using(SqlCommand cmd=new SqlCommand())
       {
         cmd.ConnectionString="your_connection_string";
         cmd = new SqlCommand("Select Surname from Users Where Username =@username);
         cmd.Connection=cn;
         cmd.Parameters.AddWithValue("@username",Ssession);
         cn.Open();
         surname=cmd.ExecuteScalar().ToString();
         cn.Close();
         return surname;   
        }
      }
 }

and call this method,

string surname=DBdatabase.ForenameSelect(b);

__avd 1,826

You need to include the markup in your post that you've tried. I think you need to include the return url hidden field that contains the absolute URI of your webapp's resource/page.

<form ....>
  .....
  <input type="hidden" 
         name="return" value="http://localhost/WebSite/page1.aspx" />
  ....
</form>
__avd 1,826

Parse the string and wrap update code in,

Datetime dt;
if(DateTime.TryParse(date,out dt))
 {
   //code to update record
 }

EDIT:

@HunainHafeez : Done, Thanks alot man ! but just for learning purpose tel me that how did it work ?

I think return value of Calendar extender will be DateTime.MinValue. if you didn't select the calendar then this statement String date = Request.Form[txtb.UniqueID]; assign invalidate date value. Using DateTime.Parse, DateTime.TryParse and DateTime.ExactTryParse - static methods of DateTime struct, you can parse the string data to DateTime object and also validate date/time value.

HunainHafeez commented: wowwwwwwwwwww ! Done, Thanks alot man ! but just for learning purpose tel me that how did it work ? +2
__avd 1,826

You must have to post relevant code that you've written so far, name of Database product that you're using, and Stored-Proc desciption (name along with parameters type).

Generally, we use ADO.NET core Provider API - Connection,Command,DataReader classes to execute Stored-procedures/functions/queries.

__avd 1,826

You're passing productid to ProductLarge.aspx as QueryString and rendering an image via handler so you need to request the handler with productid in ProductLarge.aspx.

<asp:HyperLink 
          ID="lnkImage" runat="server" 
          ImageUrl='<%# Eval("productid","~/Handler.ashx?productid={0}") %>'
          NavigateUrl='<%# Eval("productid","ProductLarge.aspx?productid={0}")' />

and markup in ProductLarge.aspx should be,

<img src='Handler.ashx?productid=<%=Request["productid"] %>' alt='Large Image' />
__avd 1,826

ABCpdf is commecial product. Use wkhtmltopdf tool or download the iTextSharp library. (Tutorials link)

__avd 1,826
__avd 1,826

You should have to use AJAX Extension - UpdatePanel control. For more info read MSDN pages about AJAX extension.

__avd 1,826

@gahhon - You must have to post the solution here so other members will benefit from your question/answer.