Coder Baba
2.41K subscribers
1.01K photos
23 videos
722 files
723 links
Everything about programming for beginners.
1 and only official telegram channel of CODERBABA India.

Content:
.NET Developer,
Programming (ASP. NET, VB. NET, C#, SQL Server),
& Projects
follow me https://linktr.ee/coderbaba
*Programming
*Coding
*Note
Download Telegram
👍1
Infosys is Hiring
walk in recruitment event at infosys Hyderabad campus
register now by clicking the link:
https://surveys.infosysapps.com/recruitment/a/h8E4FIgCrkaF

Hiring: #Java, #dotnet, #sap #abap and #sap #fico professionals

Experience: 3-8 years

Location: gachibowli, hyderabad

➡️ Date of Event: 6 January 2024 (Saturday) ⬅️
👍1
🚀💻 Unlock the Power of Clean Code in ASP.NET C#! 🌟

Striving for cleaner, more efficient code in ASP.NET? 🌐 Let's dive into 10 golden tips to streamline your development process and craft top-notch, maintainable code! 🛠📝

1️⃣ Responsive Design Made Easy: Utilize CSS frameworks for responsive web designs. Embrace external files over inline styles for faster page loads. Pro tip: CDNs are your best friend! Speed up your website by leveraging them for file downloads. ⚡️🎨

2️⃣ Configuration Clarity: Store your connection strings in configuration files. Keep your code clean and separate business logic from configurations. 🗃🔗

3️⃣ Exception Handling Mastery: Always use try-catch blocks for effective exception handling. It's your safety net when things go haywire! 🛡👨‍💻

4️⃣ Methodical Methods: Break down complex tasks into smaller, reusable methods. Enhance readability and maintainability! 📚🔄

5️⃣ Optimization is Key: Optimize your code for efficiency. Seek ways to enhance performance without sacrificing functionality. ⚙️🔍

6️⃣ Database Optimization: Opt for stored procedures and indexing to turbocharge database queries. Boost speed and retrieval efficiency! 💽⚡️

7️⃣ Client-Side Validation FTW: Utilize AJAX validation controls for lightning-fast client-side validation. Enhance user experience while minimizing server requests. 🌐

8️⃣ Repeater over Gridview: Embrace repeater controls over grid views for smoother, more tailored data presentations. Simplify and optimize your UI! 🔄📊

9️⃣ Shorthand Skills: Master the art of shorthand code. Streamline your syntax for cleaner, more concise code snippets. ✍️🚀

🔟 Reusable Methods: Create reusable methods for common operations like insert, update, and delete. Reduce redundancy and accelerate development! 🔄🔧

Let's elevate our coding game together! Which of these tips resonates most with your ASP.NET journey? Share your thoughts! 🌟💬 #ASPNET #CleanCode #ProgrammingTips #DeveloperCommunity
AutoGenerate ID in aspdotnet C#
———————————————————
private void AutoGenerateID()
{
SqlConnection con=new SqlConnection("");
string qr="select 'EMP' + cast(max(cast(SUBSTRING(employeeid,4,5)as int))+1 as nvarchar)as nextkey from tblemployee";
SqlCommand cmd=new SqlCommand("qr",con);
if(con.State==ConnectionState.Closed)
{
con.Open();
}
SqlDataReader dr=new cmd.ExecuteReader();
while(dr.read())
{
if(dr[0].ToString()!="" || dr[0].ToString().trim()!=string.empty)
{
string id=dr[0].ToString();
textempid.text=id;
}
else
{
textempid.text="EMP1";
}
}
if(dr.HasRows)
{
dr.Close();
}
}
________________________________________________