|
John Simmons / outlaw programmer wrote: I didn't say "automatically - I said "programatically"
Hmmm, he should have read more carefully before posting
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
John Simmons / outlaw programmer wrote: I didn't say "automatically - I said "programatically"
Yeah, my mistake.
John Simmons / outlaw programmer wrote: When the user clicks a button to submit data, I want the gridview to show the new data. I tried calling DataBind()
Use triggers in the update panel. Assume you have button named "btnSubmit", the trigger can be written like
<Triggers>
<asp:AsyncPostBackTrigger ControlID="btnSubmit" />
</Triggers> In the "btnSubmit"'s click event handler,
yourGrid.DataSource = GetValues();
yourGrid.DataBind();
You have to use this kind of triggering only if the button is placed outside of updatepanel If button is inside the panel, you don't need to write these kind of triggering. It will be handled automatically.
|
|
|
|
|
hello friend
i am working on card reader detection.Card reader have multiple port.
i found all the port names(ex:-A,C,D,E)
which have Memory Card. but blank Card reader drive name not detected.
How i find blank card reader drive Name.Please Help me
cODE:-
public string[] getLogicalUsbDisks()
{
int i = 0;
string[] lista;
Console.WriteLine("fetching logical disks...");
try
{
ManagementObjectCollection drives = new ManagementObjectSearcher(
"SELECT Caption, DeviceID,Name FROM Win32_DiskDrive WHERE InterfaceType='USB'").Get();
foreach (ManagementObject k in drives)
{
string ddd = k["DeviceName"].ToString();
Core.DriveManager _DManager = new Core.DriveManager();
_DManager.GetDriveLetterFromDisk(ddd);
}
lista = new string[drives.Count];
// browse all USB WMI physical disks
foreach (ManagementObject drive in drives)
{
// browse all USB WMI physical disks
foreach (ManagementObject partition in new ManagementObjectSearcher(
"ASSOCIATORS OF {Win32_DiskDrive.DeviceID='"
+ drive["DeviceID"]
+ "'} WHERE AssocClass = Win32_DiskDriveToDiskPartition").Get())
{
string dd = partition["Name"].ToString(); // browse all USB WMI physical disks
foreach (ManagementObject disk in new ManagementObjectSearcher(
"ASSOCIATORS OF {Win32_DiskPartition.DeviceID='"
+ partition["DeviceID"]
+ "'} WHERE AssocClass = Win32_LogicalDiskToPartition").Get())
{
string djd = partition["DeviceID"].ToString();
string gg = disk["Name"].ToString();
lista[i] = disk["CAPTION"].ToString();
i++;
}
}
}
return lista;
}
catch (Exception e)
{
Console.WriteLine("error: " + e.ToString());
return null;
}
Piyush Vardhan Singh
p_vardhan14@rediffmail.com
http://holyschoolofvaranasi.blogspot.com
http://holytravelsofvaranasi.blogspot.com
|
|
|
|
|
i am working with large video upload . for this i use splits the video into blocks(10 MB) and upload it using offset value. more over i have to show the progress
but i couldn't show the progress while the upload in progress. once the upload is over ,then status message appears.what is solution for this?
|
|
|
|
|
hello all i wnat to add google ads on my page plz help me
Thanks & Regards,
Prashant B. Lavate
Software Engineer
Mobile : +919423872257
Pune(India)
|
|
|
|
|
Prashant B. Lavate wrote: hello all i wnat to add google ad
That's a poor explanation. Learn[^] how to ask questions. Use google[^] before you ask.
|
|
|
|
|
if u know ans plz let me know... or please leave it
Thanks & Regards,
Prashant B. Lavate
Software Engineer
Mobile : +919423872257
Pune(India)
|
|
|
|
|
You sir, are an idiot. We're not here to just provide you with teh codez.
|
|
|
|
|
Well, the best place to find out how is Google. It has full details.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
I am using forms authentication for login.i call formsauthentication.signout() for logout.but when i click backspace the page will redirect to the previous page.how i sort out this.when anyone try to click logout and click backspace no redirection will takesplace.how is it possible.Please help me to send some code..its urgent.
modified on Tuesday, September 23, 2008 6:02 AM
|
|
|
|
|
SreejithAchutan wrote: Please help me to send some code..its urgent
To quote a very clever man "How original, nobody ever says 'take your time, its not that important'".
|
|
|
|
|
hai.
currently i m using asp.net with c# 2005 (2.0 framework).
here i have created a page with 50 fields (mixture of labels, textbox, dropdown box, image controls).
The thing is when user select the 1st two field (both are dropdowns) then only all the other fields should enable for the user. we can user the disable property and do it. but to do for 48 fields is too risky.
So is there anyother way to put a layer (or screen) over the 48 fields where user cant use the fields before selecting the dropdowns?
guide me.
thanks in advance - KARAN
|
|
|
|
|
Hi , yes you can do it . In aspx page you create table and put all 48 fields under this table .
and done table visible = false.
and visible true at the IInd dropdownlist selection event.
<table id="table1" runat="server" visible="false">
your all fields
</table>
<div class="ForumMod">modified on Tuesday, September 23, 2008 3:27 PM</div>
|
|
|
|
|
thanks sneha. but the thing is i already used nearly 10 tables to segregate the fields, so implementing the tables will become more critical for me. Is there any control in .net 2005 to proceed my work?
guide me.
thanks in advance - KARAN
|
|
|
|
|
....Or place them in a div and toggle the visibilty.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
Pu all those control in a panel and toggle panel's visibility depending on your condition.
|
|
|
|
|
thanks navaneeth. i didnt try this . let me processs and if any i will come back.
Actually what i m exactly looking is....
Please check the following link (1st press the close button) and press the refresh button. A screen will appear so that until the process finish, we cant choose any films. The same i m trying in .net 2005. is there any "covering screen" like this?
link : https://www.thecinema.in/thecinema.in/cinemalite.html
|
|
|
|
|
Karan_TN wrote: https://www.thecinema.in/thecinema.in/cinemalite.html
I can't take it as it is blocked.
|
|
|
|
|
Hi,
You can do something like that with javascript - it's like a curten (I don't know if I translated it well) - I know there is a bunch of these on the javascript pages on the net.... Try to google it
|
|
|
|
|
thanks for your reply simsen. plz could you give me the link ? i searched in many place. but i cant get the exact thing, which i need..... help me
|
|
|
|
|
I developed a site in asp.net 2.0. It works fine in IE 6 and 7 but does not display images correctly in IE 8 beta.
Any idea.........................
Do good and have good.
|
|
|
|
|
Anyone please help me
I have a program which converts a .txt file to PDF file . I am getting the following error while running the program
Error
'C:\Documents and Settings\........' is not a valid virtual path in ASP . NET
I give my Code below ...
code in button Click
---------------------------
String fileName = "";
String strText = "";
// create instance of the PDF manager
IPdfManager objPDF = new PdfManager();
// Create new document
IPdfDocument objDoc = objPDF.CreateDocument(Missing.Value);
// Add a page to document. Pages are intentionally small to demonstrate text spanning
IPdfPage objPage = objDoc.Pages.Add(300, 300, Missing.Value);
// use Arial font
IPdfFont objFont = objDoc.Fonts["Arial", Missing.Value];
fileName = Path.GetFullPath(fileUpload1.PostedFile.FileName);
try
{
strText = objPDF.LoadTextFromFile(Server.MapPath(fileName));
}
catch (Exception ex)
{
Response.Write("error is "+ex.Message);
}
// Parameters: X, Y of upper-left corner of text box, Height, Width
IPdfParam objParam = objPDF.CreateParam("x=10; y=290; width=280; height=280; html=true");
while (strText.Length > 0)
{
// DrawText returns the number of characters that fit in the box allocated.
int nCharsPrinted = objPage.Canvas.DrawText(strText, objParam, objFont);
// HTML tag generated by DrawText to reflect current font state
String strHtmlTag = objPage.Canvas.HtmlTag;
// The entire string printed? Exit loop.
if (nCharsPrinted == strText.Length)
break;
// Otherwise print remaining text on next page
objPage = objPage.NextPage;
strText = strHtmlTag + strText.Substring(nCharsPrinted);
}
// Save document, the Save method returns generated file name
String strFilename = objDoc.Save(Server.MapPath("mask.pdf"), false);
lblResult.Text = "Success! Download your PDF file <A HREF=" + strFilename + ">here</A>";
----------------------------
Thanks in Advance
Kovuru Sreedhar
|
|
|
|
|
kvsreedhar wrote: Error
'C:\Documents and Settings\........' is not a valid virtual path in ASP . NET
Says it all really. ASP.NET cannot access your C: drive. It can only access its own virtual directory.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
thankyou for your consideration to my query
may please suggest a solution so that I can access from any drive
Thanks in Advance
Kovuru Sreedhar
|
|
|
|
|
Give permissions to IISWPG user group. Notice that it can cause security leak.
|
|
|
|