|
I am using a Radio button List in my application. The first button is checked by default.
When i enter a search text in a textbox and click the second button if it is null or invalid text it throws an error message....
and the second button is checked ......
I want the first button to be checked if invalid text enters and error message is shown...
the code is attached....
<asp:radiobuttonlist id="rbperspect" runat="server" autopostback="True" font-bold="True"><br />
RepeatDirection="Horizontal" Width="202px" Height="18px" OnSelectedIndexChanged="rbperspect_SelectedIndexChanged"><br />
<br />
<br />
<br />
</asp:radiobuttonlist>
SAJAN A PILLAI
C#.NET Programmer
TELESOFT INDIA PVT LTD...
BANGALORE
"Winners don't do different things. They do things differently. ...
|
|
|
|
|
i have a link button control in the gridview. i have done data binding in this contol
i have an event , row command of the gridview,now the problem is when i click the linkbutton , and if i have stated the postback url property then it is not comming in the row command event.
if i don't use the post back url event , then it is comming in the event.
Y it is happening.
it there any contol that can be used to send in the row command event along with the post back url property
Yesterday is a canceled check. Tomorrow is a promissory note. Today is the ready cash. USE IT.
|
|
|
|
|
HTML SIDE
------------------
<asp:templatefield headertext="Action">
<itemtemplate>
<asp:linkbutton id="LnkDetails" runat="server" text="Details" postbackurl="">
CODEBEHIND SIDE
-------------------
protected void Gridjango_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
GridViewRow Row = e.Row;
int JobID = Convert.ToInt32(Row.Cells[0].Text);
LinkButton LnkDetails = (LinkButton)Row.FindControl("LnkDetails");
string url = "Test.aspx?JobID=" + JobID;
LnkDetails.OnClientClick = "window.open('" + url + "','popup','toolbar=no,location=no,direction=no,status=no,menubar=no,scrolling=yes,resizable=no,width=400,height=450,left=200,top=50'); return false;";
}
}
|
|
|
|
|
Can anyone know how to invoke/open Yahoo messenger in client machine from Classic ASP.
Subash
|
|
|
|
|
You really can't, because the web browser cannot open other apps.
This is the ASP.NET forum, not ASP.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I am trying to delete a directory using object of Directoryinfo but it leaves an inaccessible directory on disk. This folder becomes Read only.How can I delete directory permanently.
|
|
|
|
|
In ASP.NET, you can only manipulate folders within your server root directory
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
How can I set resolution of uploaded image and convert it into byte array so that I can store it in database
|
|
|
|
|
The bitmap class's save method has an over load that takes a stream, you can use a buffered stream to end up writing to a byte array.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi
Thanks for your response. In the following code I get error
System.Runtime.InteropServices.ExternalException: A
generic error occurred in GDI+.. Please help me.
string NewFile = System.IO.Path.GetFileName(userPostedFile.FileName);
string imagepath = filepath + System.IO.Path.GetFileName(userPostedFile.FileName);
System.Drawing.Image imgSource = System.Drawing.Image.FromFile(imagepath , true);
Bitmap bmp = new Bitmap(imgSource);
bmp.SetResolution(72, 72);
bmp.Save(NewFile);
FileStream fs = File.Open(NewFile, FileMode.Open);
System.Drawing.Bitmap newimg = new System.Drawing.Bitmap(fs);
MemoryStream ms = new MemoryStream();
newimg.Save(ms, System.Drawing.Imaging.ImageFormat.Jpeg);
newimg.Dispose();
byte[] imgdata = new byte[ms.Length];
ms.Read(imgdata, 0, NewFile.Length);
imgdata= ms.ToArray();
Thanks
|
|
|
|
|
Which line gives the error ?
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi
I have a web-page which displays details from a database to a user which can be updated.
How can i lock the page to a specific user so that if a different user logs on and tried to access it they can only see a read only version.
any articles or ideas would be great
thanks!!!
|
|
|
|
|
You would do this in the DB, you'd store a value to say which user had the lock, and the date/time of the lock, so it can be expired after an appropriate time
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi
thanks for the reply.
I have now set up a table which stored a session value for the user's login
My next question is, is it possible to delete the person's entry into the table after say half hour?
any help would be great
thanks
|
|
|
|
|
When you try to access the record, you check if it's locked, AND you check the time it was locked. If the lock has timed out, you ignore/overwrite it.
It doesn't matter if it timed out after 30 minutes, only that it was recognised as having timed out at whatever point after 30 min, someone else tried to access it.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
yeh but thats the bit i'm stuck on
How would i check that its been more then 30 minutes?
i.e. do i have an IF statement in the c# code saying something like
if datetimefield > 30???....
This is a new area to me
I undertsand the logic just don't know the syntax to check for more than 30 mins
thanks for the help so far!
|
|
|
|
|
hi,
-> how to store session id in URL ?
Dude...
modified on Tuesday, February 26, 2008 4:57 AM
|
|
|
|
|
Why would you want to ? Or do you mean, how do you set ASP.NET up so the URL is used to store the session Id ?
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Friends...How to disable our browser back button? help me please
Gopinath.R
|
|
|
|
|
You can't. You can write javascript that navigates you back forward, but that's just a hack and easy to side step.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi Friends ..
I've a difficulty related to GridView control (language C#). I've placed Dropdownlist in the GridView Control. How can I fire the change event of the dropdownlist.
placed in the GridView or any event ..
thanking you ...
... Smile is the curve, which makes everything streight ...
|
|
|
|
|
Your issue is that you need to do your data binding before page load, so that the event can fire, because otherwise, viewstate is recreated before the control exists, for the event to be restored.
The automatic gridview row editing features will just handle this for you, if you only want it for a row you are editing.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hello Everybody,
I have an application where I pass some values in QueryString. Can anyone tell me how to pass the value in an encrypt format.
HappyCoding
A key to every Solution
|
|
|
|
|
.NET framework has many libraries supports Encryption and Decryption. Check System.Security.Cryptography name space.
|
|
|
|
|
Perhaps if you need to encrypt it, you should just find another way to store it, like in the session ?
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|