Thursday, February 19, 2009

Some Practical .Net Soultions !!

Que : How To Convet Uppercase later ?

Ans : Select UPPER (dir_name) as name from tbldirectots.
The out put will come like DENESH KUMAR, VIJAY SHUKLA


Que . How to get the image on the user page by DataReader ?

Ans : TitleImage.Imageurl=folderpath + dirv["au_page_image"].ToString() ;
Note : 1 . For getting the folderpath we use this code on .cs page public string folderpath =
ConfigurationManager.AppSettings["folserpath"].ToString () ;
2. This key is defined in the Web.Config file like that -
<>
< key="folderpath" value="upload/">
3. Upload is the folder where the image is stored .
4. ImageUrl is like txt for text box of Image .Like txtname.text .


Que : How to show the Image on the User Page by GridView ?
Ans : By This Code
'/> Note : 1. In The Upload folder , image is stored there .Image has two things one Image and
second its name (boy.jpg)
2. Image Name like (boy.jpg) is saved in database's field like (dir_image) .
Mistake : One mistake when i was using DataReader .
Ans : 1. In the DataReader while loop are used . i don't know foreach loop can be used or
not , but when i was using it was not working .I was using foreach loop in DataReader and it
was not working ,it takes of time but did't work and ultimately i used while loop and i got
my task .
2. Sql DataReader DerDr=DirCom.ExecuteReader() ;
if (DerDr.HasRows)
{ while(DerDr.Read())
DirName=DirName + "" + DerDr["dir_name"].ToString() +" "
1:
}


Que : What syntax is used for Back Button ?
Ans : < href="javascript:history.back(-1);"> Back

Que : A Query for select the fixed character ?
Ans : string str = "select top 4*,substring (pr_title,1,100) as detail from tblProjectMaster
where pr_active='yes'and pr_delete='No' order by pr_iddesc" .


Que : What is the Syntax for Back link and Forword link ?
Ans : Syntax for Back link and Forword link :
< href="javascript: history .go (-1)">
< href="javascript: history .back(-1)">


Que : What is the code for OnImage Click ?
Ans : < width="100" class="hometxt">
< href="'Upload/<%">' rel="lightbox > <
img src='Upload/<% Databinder.Eval(Container,"DataItem.image") %>' style=""bordercolor=""
width="" hight="" border="" />
On putting mouse over image this link will appear -
http://localhost:1713/smi/upload/sunset.jpj .


2 comments:

Dr. R. Prakash said...

sir i m an art graduate and due to less information about IT i dont know how to design my blog page. plz help me
rakesh prakash

Maithili Mandan said...

दिनांक 16.02.2009 कें मैथिली मंडनक तत्वावधान में 'मैथिली युवा लेखन दशा आ दिशा' विषय पर शहीद भगत सिंह कॉलेज, नई दिल्ली में एक टा संगोष्ठीक आयोजन कयल गेल. एहि अवसर पर देशक विभिन्न भाग स' आयल टटका पीढीक सक्रिय भागीदारी रहल. बनारस से आयल 'नवतुरिया' केर संपादक अरुणाभ, कटिहार (बिहार) से रोहित झा, दिल्ली से अलोक रंजन, मिथिलेश कुमार राय, फिरदौस, धर्मव्रत चौधरी, देवांशु वत्स, सेतु कुमार वर्मा प्रमुख वक्ता छलाह. ऑडियो कोंफ्रेंसिंग के जरिये गाजियाबाद से मैथिली आ हिंदीक प्रख्यात कथाकार - संपादक अनलकांत ( गौरीनाथ ) आ सहरसा सं चर्चित युवा कथाकार - कवि अखिल आनंद सभा स' जुड़लैथ. संगोष्ठीक संचालन युवतम रचनाकार कुमार सौरभ केलैथ. एहि अवसर पर नवतुरक रचनाकार सबहक क्षोभ एकटा पर्चा पर देखल गेल जे सभा में उपस्थित करीब एक सौ रचनाकार पाठकक बीच वितरित कयल गेल