Categories
- 2011-2020 Agile Apple ASP.NET Cloud Companies Comparison Creativity Databases Deliberate Practice Experience Google Innovation Learning Management Microsoft Mobiles Predictions Productivity Programmers Programming Project Management SDLC Skills SoftwareCraftsmanship SQL-Server Success Super Uncategorized VB.NET
- alignment
- Amazon
- Apple
- ASP.NET
- Backup
- behaviour
- Cell
- Cloud
- cloud development
- comments
- Companies
- Comparison
- Creativity
- CSS
- Databae
- Databases
- DBA
- DELETE
- Deliberate Practice
- DevOps
- Dreyfus Model
- EC2
- error msg
- events
- expertice
- frames
- free software
- God
- GridView
- happyness
- HTML
- HTTP handler
- image
- INSERT
- JavaScript
- layout
- learning
- MaxSize
- Microsoft
- morals
- Nokia
- Oracle
- page
- parameter
- path
- PC development
- phone development
- predict
- Productivity
- QueryString
- risk
- science
- Smart Solution
- social media
- SoftwareCraftsmanship
- sp_
- SQL Server
- steve jobs
- Storage
- tables
- team
- Time Management
- Tough Problem
- TreeView
- UI
- UPDATE
- Upload
- VB.NET
- Virtualization
- VM
- web.config
- web development
- Word
Top Posts & Pages
Twitter Updates
Tweets by AhmedAbayazidCounter
Category Archives: VB.NET
Copy Cell in GridView
In GridView add this column: <asp:CommandField ButtonType=”Button” SelectText=”” ShowSelectButton=”True” /> [\sourcecode] Then in code-behind: Protected Sub GridViewHandLinks_RowCommand(ByVal sender As Object, ByVal e As GridViewCommandEventArgs) If e.CommandName.Equals(“Select“) Then Dim index As Integer = Convert.ToInt32(e.CommandArgument) Dim row As GridViewRow … Continue reading
Refresh TreeView after insert/update/delete ?
Wrong solution : DataBind() BEFORE close() TreeView1.DataBind() con.Close() Right solution: In btnListtAdd_Click : To get the ID Dim lastID As String = “Select @@Identity” Dim getID As Integer ‘this is to get last ID … Continue reading
Posted in Databases, Programming, SQL-Server, VB.NET
Tagged ASP.NET, DELETE, INSERT, refresh, TreeView, UPDATE
Leave a comment
Read PDF from a Database and Open it into a Frame
IHttpHandler is aowsome. You read your file in the buffer and just send it to src as if it is a named file, so no need to read and save a temporary file in client’s PC. iframePDF1.Attributes.Add(“src”, “ShowPDF.ashx?pID=” & Request.QueryString(“pID”)) … Continue reading
Posted in Databases, Programming, SQL-Server, VB.NET
Tagged HTTP handler, PDF, Smart Solution, SQL Server, Tough Problem, VB.NET
Leave a comment
Error msg: No mapping exists from object type System.Data.SqlClient.SqlParameter to a known managed provider native type.
Dim pID As New SqlParameter(“@ID”, SqlDbType.Int) pID.Value = TextBoxParentID.Text cmd.Parameters.AddWithValue(“@ID”, pID) I changed it to: Dim pID As New SqlParameter(“@ID”, SqlDbType.Int) pID.Value = TextBoxParentID.Text cmd.Parameters.Add(pID) and it works also this works: Dim pID … Continue reading
Posted in Databases, Programming, SQL-Server, VB.NET
Tagged data type, error msg, parameter, QueryString, SQL Server, VB.NET
3 Comments
ExecuteReader vs ExecuteNonQuery vs ExecuteScalar
ExecuteReader() For SELECT statement ExecuteNonQuery() For INSERT , UPDATE and DELETE Not for SELECT statement. ExecuteScalar() For images Ahmed.
Posted in Comparison, Databases, Programming, SQL-Server, VB.NET
Tagged Comparison, Databae, DELETE, image, INSERT, QueryString, SELECT, SQL Server, tables, UPDATE
Leave a comment
Increasing the Maximum Upload Size
The 4MB default is set in machine.config, but you can override it in your web.config. For instance, to expand the upload limit to 20MB, you’d do this: <system.web> <httpRuntime executionTimeout=”240″ maxRequestLength=”20480″ /> </system.web>
Posted in Databases, Programming, SQL-Server, VB.NET
Tagged MaxSize, SQL Server, Upload, VB.NET, web.config
Leave a comment
How to Save and Display a PDf/Word file ?
For displaying, it will save the pdf/word to temp folder then open it and after closing will delete the temp file.
Posted in Databases, Programming, SQL-Server, VB.NET
Tagged Databases, PDF, SQL Server, VB.NET, Word
Leave a comment
Sending data to another page
There are many ways to send data to another page. QueryString , Context or Session. The easiest and oldest way is QueryString. In first page: Link second page and variable e.g. NavigateUrl = “~/SecondPage.aspx?variable_to_be_send=1” In second page: Protected Sub Page_Load(ByVal … Continue reading
Error 7 It is an error to use a section registered as allowDefinition=’MachineToApplication’ beyond application level.
PROBLEM: Error 7 It is an error to use a section registered as allowDefinition=’MachineToApplication’ beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS. D:\lawsDB\laws\news\web.config 83 SOLUTION: There was two web.config files, one in … Continue reading