I have 2 Header user control. One for English and one for Arabic.
on English Header user control page load, if i write
string
s = Request.Url.AbsoluteUri;
string str="Select ArabicUrl from WebsiteURLs where EnglishURL='"+s"";
sqlcommand cmd=new sqlcommand(str,con);
con.open();
sqlDataReader dr=cmd.ExecuteReader();
if(dr.Hasread())
{
window.open(ArabicUrl, '_self');
}
dr.close();
con.close();
and on Arabic Header user control page load, if i write
string
s = Request.Url.AbsoluteUri;
string str="Select EnglishUrl from WebsiteURLs where ArabicURL='"+s"";
sqlcommand cmd=new sqlcommand(str,con);
con.open();
sqlDataReader dr=cmd.ExecuteReader();
if(dr.Hasread())
{
window.open(EnglishUrl, '_self');
}
dr.close();
con.close();
This will be good or not in my condition or it needs some changes. Please suggest me.