|
|
Random r = new Random();
System.IO.DirectoryInfo d = new System.IO.DirectoryInfo(@"C:\YourImageDirectory");
System.IO.FileInfo[] fi = d.GetFiles();
int file = r.Next(fi.GetLength(0));
string FIleName = fi[file].FullName;
-- modified at 9:51 Monday 21st August, 2006
how vital enterprise application are for proactive organizations leveraging collective synergy to think outside the box and formulate their key objectives into a win-win game plan with a quality-driven approach that focuses on empowering key players to drive-up their core competencies and increase expectations with an all-around initiative to drive up the bottom-line. But of course, that's all a "high level" overview of things
--thedailywtf 3/21/06
|
|
|
|
|
Hi
In my application, i am using gridview bind with objectdatasource. In gridview i am having some coloumn and also the last column is Edit column that is designed in gridview control itself. While clicking Edit link all the textboxes are displayed after giving value i have to click update. But Before update i have to validate that all the textbox contains text or not. Can anyone please help me. I need it immediately. THanks in previous.
Prya
|
|
|
|
|
The easiest way would be to add a requiredFieldValidator control and set the properties.
how vital enterprise application are for proactive organizations leveraging collective synergy to think outside the box and formulate their key objectives into a win-win game plan with a quality-driven approach that focuses on empowering key players to drive-up their core competencies and increase expectations with an all-around initiative to drive up the bottom-line. But of course, that's all a "high level" overview of things
--thedailywtf 3/21/06
|
|
|
|
|
Hi Expert,
I am facing some critical problem .Kindly help me.
I would like to write code in asp.net to check java script is enabled or disabled as well as cookies is enabled or disabled on client PC. If any one has code or link ,please let me know .
Any help is appreciated.
Thanks & Regards
Rajesh
rajesh
|
|
|
|
|
|
Use the following code:
Dim bc As HttpBrowserCapabilities = Request.Browser
Dim js As Boolean = bc.JavaScript 'if js returns true then enabled else disabled
Dim cks As Boolean = bc.Cookies ' if cks returns true then cookies is enabled else disabled.
Thanks and Regards,
Suresh Dayma
|
|
|
|
|
You could always put a large warning in your markup, then attempt to hide it with javascript. If javascript is enabled, then the warning is hidden. If it is disabled then the warning stays.
|
|
|
|
|
Hi all,
I have some implementation problem.
I want to show images from database in datagrid.
for that I want to create dynamic table in grid.In this grid one row can fit single image or row can contain more than one images depend upon size.
I know I am still not clear but it is somthing to create rows at runtime and changing there colspan property.
I hope u help me.
Regards,
Nagraj
|
|
|
|
|
|
Hi friends,
I have used skmMenu for creating Menu in my page and have a xml file for the menu.
Also i have binded the xml file as the DataSource to the menu.
But i couldnt find the menu while executing.
Can anyone please help me in finding it out...?
|
|
|
|
|
are u getting any error?
debug while assigning datasource to menu
|
|
|
|
|
Am not getting any error.
But the menu couldnt be seen in the form.
Do i have to change any property either in form or in menu control?
The code i used for binidng is:
<br />
<br />
private void Page_Load(object sender, System.EventArgs e)<br />
{<br />
Menu1.DataSource = Server.MapPath("menu.xml");<br />
Menu1.DataBind();<br />
}<br />
<br />
<br />
|
|
|
|
|
Hi... Good Day!
I have a question abount printing in asp.net. I'm using asp.net 1.1(VB) to develope the page.
If i want to print the current web page by clicking on the "Print" button, how should i write the code to fire the print function?
I have try many times, but stil can't work. Anyone can help me about this problem. Can give me a guide about this print function.Thanks.
Best Regards,
Pei Sun
|
|
|
|
|
In the Page_Load event, Type in:-
btnprint.Attributes("onClick") = "javascript:window.print();"
Thanks and Regards,
Suresh Dayma
|
|
|
|
|
You only use the javascript: protocol when you run code in an URL. An event is not an URL, so it doesn't use a protocol.
btnprint.Attributes("onclick") = "window.print();"
---
b { font-weight: normal; }
|
|
|
|
|
Hi!
Simply my prob is:
For Datagrid i used 3 events:
ItemCommand,Databound & PAgeindexchanged..
Here that Page index changed wnt work, Instead of that it redirects the page where i mentioned in the itemcommand event, this event takes the more preference than page index,
How can we solve..?
If u need more explanation:
I hv the datagrid name as dg. i want to do paginng in that dg control.
I am using c#.
I fetched the imagebutton control name as img to the dg.
If we clicks that img it has to go another form(Models.aspx).
For this i used:
dg_itemdatabound event for find the control (img)
dg_itemcommand event for redirects to next page(Models.aspx)
Now i used 3rd event for the same dg control:
dg_Pageindexchanged event for paging.
Problem is:
I got the Prev & Next Buttons in the dg but if i clicks that one it redirects the page to Models.aspx (which is i mentioned in the itemcommand event)
I am displaying the next form based on the click of the imagebutton dynamically..
instead of that it has to display the remaining values...
I hope u got my problem.., How can we solve this one?
Prabu.T
|
|
|
|
|
have you given OnPageIndexChanged correctly in the html side?
Best Regards,
Apurva Kaushal
|
|
|
|
|
|
Hi,
I need to find out what is the request and response SOAP message that is getting transmitted when I call a web service. Could any one let me know whether any tool is available to trace the request and the response messages?
Thanks in advance
Vivek
|
|
|
|
|
I want to insert data in old xml file without override old data of that file
plz tell me
Rahul Khokale
r.khokle@yahoo.com
|
|
|
|
|
Hi,
How can I detect is cookies are enabled or not in client browser in asp.net?
Regards
Rajesh
rajesh
|
|
|
|
|
You can check whether user has enabled cookies or not with the help of javascript.
Best Regards,
Apurva Kaushal
|
|
|
|
|
Use the following code to detect whether cookies are enabled or disabled:-
Dim bc As HttpBrowserCapabilities = Request.Browser
Dim cookies As boolean = bc.Cookies
if cookies returns true then it is enabled, else disabled.
Thanks and Regards,
Suresh
|
|
|
|
|
This was fine when I use at .Net 1.1 for the gridview cells, A (in red colour).
But the output for .Net 2.0 was <FONT COLOR=RED><B>A</B></FONT>
public string strAbsent = "<FONT COLOR=RED><B>A</B></FONT>";
-- modified at 4:13 Monday 21st August, 2006
thanks in advance. Much appreciated.
|
|
|
|