How can i create a Control at runtime in ASP.NET and how can i write the events for that control?
105271
* If it's a user defined control, then use "LoadControl" on the page (if not, then a simple call to 'new' will do):\n\n-quoting from the link below-\n\n// Load the User Control\nControl uc = LoadControl("~/MyUserControl.ascx");\n// Add the User Control to the Controls collection\nPage.Controls.Add(uc);\n\nAs with dynamically loading Web controls, when dynamically loading a user control it must be done on every visit to the page (including postbacks). Too, the ideal place for this loading is in the Page's Init event.\n\n* To connect event handlers you can do something like: (quoting again)\n\nproducts.ProductSelectionChanged += new \n  CommandEventHandler(this.products_ProductSelectionChanged);
485037
I can give u a suggestion\n\ncreate a web service and a function to return some messages in XML format if the query was successfull.\n\ncall the web service from your aspx page and pass the required parameters to the function.
880089
if you know 2003, you should have the answer to this.  You have to post the form back to the same page (add a button with a method like btnSubmit_Click(object sender, EventArgs e).  Once this the page is posted back, you then need to create a database connection.\n\nYour SQL connection string should be saved in your web.config file.\n\nusing System.Data.SqlClient;\n\nSqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["con"].ConnectionString);\nSqlCommand cmd = new SqlCommand("INSERT INTO TABLENAME (Column1, Column2, Column3) VALUES (" + "'" + txtColun1 + "'" + "," + "'" + txtColumn2 + "'" + "," + "'" + txtColumn3 + "'" + ")", con);\ntry\n{\n   cmd.ExecuteNonQuery();\n}\ncatch(SqlException e)\n{\n  string error = e.Message.ToString();\n}\nfinally\n{\n  con.close();\n}\n\nThe only change is that VS 2003 use to use:\nSqlConnection con = new SqlConnection(ConfigurationSettings.AppSettings["con"]);  This is now obsolete.\n\nSorry, I updated this because yahoo answers cut have my code off.
303462
You haven't indicated which version of ASP you want to use nor what you want to do with the data once it's read.\n\nAssuming you want to read the info into a GridView in ASP.NET 2.0:\n\nhttp://support.microsoft.com/?kbid=311731
293326
use activexcontrol if it is a snippet program\n\nalso you can go for visual interdev (VS6)\n\nin case of vs.net then they have option for web development\n\nhope this helps you a little
453532
Controllers are classes in ASP and VB, so u kan just make classes in PHP and u will get the result...
1083678
Question is not clear. \n\nAnyway, If you are using DataGrid or GridView, they have built-in features on ASP.NET. If not, you can impletment this manually using tricks.\n\nPlease explain your requirement with language, platform etc.
373228
http://www.asp.net/QuickStart/aspnet/doc/security/default.aspx\n\nJust choose C# from the pull-down menu in the upper left-hand corner. All appropriate code will be shown / downloadable.
24321
What you're looking for is something called a Browser Helper Object (BHO) ...  The process is rather elegantly explained on the Microsoft web site.  See the attached source.\n\nedit - I also should mention that the easiest and most straightforward way to use the Toolbar control is through the ASP.NET forms designer in Visual Studio .NET.  To use a Toolbar on a web form, drag it onto the form as you would any other control.
224603
in your parent form\nDim withevents myChildForm as new frmChildForm\n\nIf you plan to notify the parent form that button in child form is clicked then do this at your child form\ndeclare the event at the form declaration\n===========================\nEvent ButtonClick()\n===========================\n\nfire the event when button click\n============================================================\n    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click\n        RaiseEvent ButtonClick()\n    End Sub\n============================================================\n\n\nAnd back to your parent form do this\n============================================================\n    Private Sub myChildForm_ButtonClick() Handles myChildForm.ButtonClick\n        MsgBox("Child form button  click")\n    End Sub\n============================================================\n\nDone.
345258
Usually, you would add an OnClick handler in the html. Inside that handler you'd write some javascript inside the image's html tag to take you to a new page. It might look like this:\n\nOnClick= "document.location='www.yahoo.com'"\n\nThat works fine if your image control isn't a server control. \n\nThe trick with ASP.Net is that if your image is a server control then it believes that OnClick event is a server side event. That causes a postback. Sometimes that is exactly what you want. Sometimes it isn't.\n\nIf it isn't:\n\nIn the code behind you can add an "Attribute" to the control. What this does is renders a name&#92;value pair in the control's html element tag.\n\nYou can take advantage of this to inject some javascript into the tag. \n\nAssume your control is named "imgFoo".\n\nimgFoo.Attributes.Add("OnClick", \n"document.location='www.yahoo.com'")
312118
Yes you can. ASP.NET has a lot of library, and one of them is the API to deal with creation/manipulation.\nThis link might help you: http://www.w3schools.com/aspnet/aspnet_xml.asp
205568
Try either Programmer's Resource (Free)\n\nhttp://www.programmersresource.com/forum\n\nor for a pay for answer site, try Experts Exchange\n\nhttp://www.experts-exchange.com/Programming/Programming_Languages/Dot_Net/ASP_DOT_NET
150572
http://www.softwaretoolbox.com/store/item_pages/itempage_948.asp
121947
I suggest that you read PHP and ASP.NET Go Head-to-Head\nBy Sean Hull \n\nhttp://www.oracle.com/technology/pub/articles/hull_asp.html
17814
If you want to use JavaScript from a single-threaded executable, you can use the Microsoft Script Control (ActiveX control).  Simply have the control load the script file and define the script type as "JAVASCRIPT" (or "JSCRIPT" - I'm not 100% sure).\n\nYou can enumerate the methods in the script, and call them directly.  If you need to pass parameters to a script method, you must pass them in a SafeArray.  Parameterless methods do not require a SafeArray.\n\nIf you want to expose elements of your application to the script, you may define automation objects, declare and create instances of them, and pass them to the script engine using custom variable names.  Your script can then access them using the declared variable name.  If your objects' methods need to accept parameters, you must declare them using variant types.\n\nIf you want to use scripting from a multi-threaded, or server-side application, you must use the Microsoft Script Host interfaces as the ActiveX control does not support multi-threaded environments well.
96922
I believe you should search the "ASP components" site\nmaybe you will find such a component.