|
Thanks a lot. It realy helped me
Lets work it Out.........!
|
|
|
|
|
I have a field in a drop-down grid that when the user clicks edit, the drop-down box fills with the choices. However I want it to first reflect what the field originally had so I'm trying to create a function that will do that. The field has an id and shows the description. I found some code in VB that does what I need, but the bolded words make the compiler unhappy. I am VERY new to datagrids. How can I reference the specific table and the row that it's on while looping?
public object GetSelIndex (string partCatID)<br />
{<br />
int iLoop;<br />
DataTable dt = dgParts.Tables("PartTypes");<br />
for (int iLoop2 = 0; iLoop2 <= dt.Rows.Count - 1; iLoop2++)<br />
{<br />
if (partCatID == dt.Rows(iLoop)("id"))<br />
{<br />
return iLoop;<br />
}<br />
}<br />
}
|
|
|
|
|
What is the type of the dgParts object? If is a datagrid object, then it does not have any Tables property.
|
|
|
|
|
I am dealing with web application.I want to maintain last visit time of the user.please help me
|
|
|
|
|
You can use Application variables in Session_start event of Global.asax...
Some thing like this
session_onStart()
Application("lastVisitTime")=now
end sub
Lets work it Out.........!
|
|
|
|
|
If you want to maintain the visit of the last user user, as the previous poster suggested, you should use the application object.
If you want to maintain the last visit of every user, you should log that into a database. You can get the current user using HttpContext.User.Identity.Name . If no user is logged in then it will return string.Empty
regards,
Mircea
Many people spend their life going to sleep when they’re not sleepy and waking up while they still are.
|
|
|
|
|
If you are using the ASP.NET 2.0, you might want to see the Profiles which you can persist the last visited date of a user.
|
|
|
|
|
Hi,
Is it possible to put the data from an ObjectDataSource on a Label (and not in a GridView)?
Thanks
|
|
|
|
|
No because the Label control is not a data-bound control. The ObjectDataSource control acts as a data interface for data-bound controls like GridView, FormView, or DetailsView controls.
regards,
Mircea
Many people spend their life going to sleep when they’re not sleepy and waking up while they still are.
|
|
|
|
|
Thank you for your reply.
I fixed it this way:
<br />
string RandomString1;<br />
<br />
RandomString1 = Gridview1.Rows[0].Cells[0].Text;<br />
<br />
Label1.Text = RandomString1;<br />
If you have multiple columns, just make the 0 in Cells[0] to your columnnumber.
|
|
|
|
|
But what if there are more than 1 columns to display? What if the datasource is buld dynamically, what if someone decides to add another two columns? What if the datasource changes frequently?
This is why data bound controls exist. To address these issues.
Of course you can assign the label a value from a source, but you have to do the binding.
regards,
Mircea
Many people spend their life going to sleep when they’re not sleepy and waking up while they still are.
|
|
|
|
|
Simplest way would be to set a border on the bottom and right of the label, a few px wide....
"Now I guess I'll sit back and watch people misinterpret what I just said......"
Christian Graus At The Soapbox
|
|
|
|
|
Anyone can help me to explain the concept base on the code and about this question...-->> How to transfer data from Mobile Wireless Application to Web Application using GPRS in .Net?
[ S.e.L.a.T.a.N'79 ]
|
|
|
|
|
pls use mobile development section for this question.
Nav.
|
|
|
|
|
hi,
we are creating image library using c#
can u plz help me about the topic.................
Uploading(htmlbrows control) Images to a Database, and Retrieving Images from a Database into thumbnail images.All thumbnail images shown in the same page uasing one control i.e,(whenever i click the preview button).
we are using 3-tier architecture
suresh babu.k
-- modified at 0:40 Sunday 18th June, 2006
|
|
|
|
|
try this
public static Bitmap CreateThumbnail(string lcFilename,int lnWidth, int lnHeight)<br />
<br />
{<br />
System.Drawing.Bitmap bmpOut = null;<br />
try <br />
{<br />
Bitmap loBMP = new Bitmap(lcFilename);<br />
ImageFormat loFormat = loBMP.RawFormat;<br />
decimal lnRatio;<br />
int lnNewWidth = 0;<br />
int lnNewHeight = 0;<br />
<br />
if (loBMP.Width < lnWidth && loBMP.Height < lnHeight) <br />
<br />
return loBMP;<br />
<br />
if (loBMP.Width > loBMP.Height)<br />
<br />
{<br />
lnRatio = (decimal) lnWidth / loBMP.Width;<br />
<br />
lnNewWidth = lnWidth;<br />
<br />
decimal lnTemp = loBMP.Height * lnRatio;<br />
<br />
lnNewHeight = (int)lnTemp;<br />
<br />
}<br />
<br />
else <br />
<br />
{<br />
lnRatio = (decimal) lnHeight / loBMP.Height;<br />
<br />
lnNewHeight = lnHeight;<br />
<br />
decimal lnTemp = loBMP.Width * lnRatio;<br />
<br />
lnNewWidth = (int) lnTemp;<br />
<br />
}<br />
<br />
<br />
<br />
<br />
<br />
<br />
bmpOut = new Bitmap(lnNewWidth, lnNewHeight);<br />
<br />
Graphics g = Graphics.FromImage(bmpOut);<br />
<br />
g.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.HighQualityBicubic;<br />
<br />
g.FillRectangle( Brushes.White,0,0,lnNewWidth,lnNewHeight);<br />
<br />
g.DrawImage(loBMP,0,0,lnNewWidth,lnNewHeight);<br />
<br />
loBMP.Dispose();<br />
<br />
}<br />
<br />
catch <br />
<br />
{<br />
return null;<br />
}<br />
<br />
return bmpOut;<br />
}<br />
<br />
}
Nav.
|
|
|
|
|
some personeel have education history
others have short course history
I have 3 tables: Personeel, Courses and Education.
Personeel table have primary key persId which is foreign in the other 2.
My question:
How do I get the personel details of:
those havin education history
those having course history
Combine the above two in one list and display as just a single list in a datagrid? This will become the list of active employees.
How will the querry look like and what other things do I need to do... I have tried several things out but I am really stuck.
Thanks alot,
Commickey
|
|
|
|
|
SELECT P.ID<br />
FROM PERSONNEL AS P<br />
INNER JOIN COURSES AS C<br />
ON P.ID = C.PERSONNEL_ID<br />
INNER JOIN EDUCATION AS E<br />
ON P.ID = E.PERSONNEL_ID
Could try something like that, but without really knowing your table structure it's hard to say. If you have course items and education items, you should probably think about many-to-many linking tables in between these and personnel. This will save duplication of all the course details.
|
|
|
|
|
Hi ...
I have to write a requirements document with sreen shots. I started with creating a .aspx page with controls like buttons ... data grids and stuff but it gets very tidius ... like visio is there any tool out there which can help create the web site screens like grids, buttons and other controls ...
Thanks,
Thanks
|
|
|
|
|
Can we give year scroll on ASP calender control???I have drag and drop the calender control of ASP but not used any Javascript for this.So I dont want any Javascript code.
Please help at the earliest.
Thanks and Regards.
|
|
|
|
|
I am an undergrad final year student working on a smart card based project.
I purchased a kit from a company named Advanced Card Systems. The kit does not provide a lot of help material for starter programmers.
I need to connect my smart card reader(ACR30) with the .NET environment. My project is a prototype which would show that smart cards can be used to perform online banking transactions. The front end is on ASP.NET and the back end is an Oracle 9i database. The ACR30 reader has a USB interface.
I am new to this work, so any help will be greatly appreciated. I dont know how to incorporate dlls in the environment. Also, will I need to develop Active X controls for this purpose or will the SDK be providing these facilities.
Also, will I need to create my own dll. If so, how will I do this? I was also provided with proprietarty drivers of the product as well as PC/SC drivers. I am completely confused.
I will really appreciate all the help I can get.
Thankyou, Saad.
|
|
|
|
|
Hi to all
I am rading text file ...... line by line by using
string line = rd.ReadLine();
but line contain special character like \t\r\n I want to remove all the character from that line .. HOw it possible
Yogesh
Yogesh
|
|
|
|
|
Pass the string into a loop and read until it meets any of the characters that you want to remove then apply the trim() function at that point.
I have this will help?
Greetings,
Commickey
|
|
|
|
|
Add line = line.Replace("\t","").Replace("\r","").Replace("\n","");
after your string line = rd.ReadLine();
regards,
Mircea
Many people spend their life going to sleep when they’re not sleepy and waking up while they still are.
|
|
|
|
|
Hi all,
Can any one tell me how do i add a html link button or html image button to datatable???
Please help me at the earliest.
Thanks and Regards.
|
|
|
|