|
Vsree wrote: Is there any generic method eliminate all special characters that an user enters in the textbox?
See the RegularExpressionValidator in MSDN, also you can find some sample expressions that can be used with the validator from the link[^].
Vsree wrote: Also please tell me how to use the "Data Formatting Expression" in datagrid to display the data in required format.
Numeric Format [^]
|
|
|
|
|
hi everybody
today i come here with a new doubt;
in one registration form, i have used a html filefield control to browse an photograph of the user and i have converted this image into binary and stored inthe database. but after that i need to retrieve that binary data and dispaly that in an imagecontrol in the next form. anybody know any method to assign this binary data to the image control.
please share some ideas. thanks in advance.
sebastian
|
|
|
|
|
You can create another apx page and in the page load of this new aspx you can write this.
byte[] image = null;
image =(byte[])objDV[0]["imgImage1"];// Taking it from dataview/dataset/dtable
Response.ContentType = objDV[0]["strImage1ContentType"].ToString();
Response.BinaryWrite(image);
Assume this new aspx page name is ImageLoad.aspx
In your page where you are taking an Image control, call the method from aspx
page.
<asp:image id="imgLogo" runat="server" imageurl="<%#GetLogoURL(DataBinder.Eval(Container.DataItem,"intId"))%>" alternatetext="Dynamic Image">
and in code behind you will have
protected string GetLogoURL(object objLogo)
{
return "ImgLoad.aspx"
}
Let me know if this worked for you.
"Walking on water and developing Software on a specification is easy, if
both are frozen..."
|
|
|
|
|
|
|
How can I show popup message when session time out in ASP.NET 2.0 ?
The following code show message about Session Expire. My main problem is how to detect session time out.
Dim str As String = "<script language='javascript'>" + "alert(Session has Expire')" + "</script>"
Page.ClientScript.RegisterStartupScript(Me.GetType(), "PopupScript", str)
Best Regards...
|
|
|
|
|
You can use the Session_Start event to detect the session time out, but basically this event also gets fired when the user first visits the web site, so you need a further step to check the authentication ticket to see if he is a logged-in user. You can search the forum for the sample code.
|
|
|
|
|
I try to build a custom control. In the control, it has a collection of X custom control, while there is a ITemplate in X in which contains other controls. For example,
<cc1:Custom>
<cc1:X>
<content>
<asp:TextBox id="a" runat="server">
<asp:TextBox id="b" runat="server">
</content>
</cc1:X>
<cc1:X><content></content</cc1:X>
</cc1:Custom>
The problem is I cann't access the "a" and "b" control directly from the code behind. I have to call FindControl () which it makes my code looks stupid (while you have a ten control to call). And i think it has a more ellegent way so i can call the control directly from the code behind.
Please help me !!!!
|
|
|
|
|
IMO, you still need to use the FindControl method to get reference to the TexBoxes declared in the template, and you can expose them as a public property in the X custom control so that you can directly use them in code-behind.
|
|
|
|
|
Then why when i using a Atlas UpdatePanel inside my custom control, i can access the nested control directly. For example
<cc1:custom>
<cc1:X>
<content>
<atlas:UpdatePanel>
<contenttemplate>
<asp:textbox id="a">
</contenttemplate>
</atlas:UpdatePanel>
</content>
</cc1:X>
</cc1:custom>
With the help of atlas, this time i can access "a" from code-behind. So i think it should have a way to populate nested controls in design mode.
-- modified at 7:31 Thursday 21st September, 2006
|
|
|
|
|
Sorry, but couldn't see your sample code.
|
|
|
|
|
Opp. the HTML-like tag just hits me again. Anywhere, I just found a great solution. Instead of using ITemplate for the "content" propertis, I just use a "Placeholder". And then everything just work great !!!!
|
|
|
|
|
Hi,
I'm trying to access client side innerhtml code from server side on postback.
How do I do it.
I've tried putting a div server tag around the code i need, and then saying divContent.innerhtml, but it doesn't work. Any suggestions?
Thanx
Regards,
Tintin
|
|
|
|
|
Hello...
You can put a and make the | runat=server and put all your client code in that | .
Eg :-
In code behind adding this
TbMain.InnerText.ToString()
You will get the complete table block from the | i.e
Let me knw, if you r looking for something else will try to help you out.
"Walking on water and developing Software on a specification is easy, if
both are frozen..."
|
|
|
|
|
|
No, .innerhtml doesn't seem to work. I've tried it with a
no success.
However, putting in a hidden server field, and getting the innerhtml from the div in javascript works, BUT I get an "UNKNOWN ERROR" popup-window when trying to set the hid1.value = div's inner html!
I tried setting .value = 'test'; WORKS FINE
Why is that
'''''heres some code''''
var strHTML = "";
strHTML = document.getElementById('<%=divTables.ClientID%
').innerHTML.toString();
alert(strHTML); //just a test
document.getElementById('<%=hid1.ClientID%>').value = strHTML.toString();
//then it breaks.
but if its a different string, it works
please help
Regards,
Tintin
|
|
|
|
|
Hi all
I am trying to insert data into Ms-Assess DB it is working Fine in Local
System But not in server
It is giving Error as
"Operation must use an updateable query."
I given all the file permissions but still it is giving same error
Plz can any ine help it is urgent
asdfasdfasdfasdfasdfasdfasdfasdfasdfasdf
|
|
|
|
|
Do you also grant the ASPNET process identity the write permission to the folder containing the DB file?
|
|
|
|
|
Hi Thx for reply
I given all the permisstions
Like Folder and .mdb file securty
and
Dim f As New FileIOPermission(PermissionState.None)
f.AllLocalFiles = FileIOPermissionAccess.Append
Dim f2 As New FileIOPermission(FileIOPermissionAccess.Write, Server.MapPath("Testdb.mdb"))
f2.AddPathList(FileIOPermissionAccess.Append Or _
FileIOPermissionAccess.Append, Server.MapPath("Testdb.mdb"))
But still it is giving the same Error
asdfasdfasdfasdfasdfasdfasdfasdfasdfasdf
|
|
|
|
|
Are you sure that the permission is granted to the right account?
kirthikirthi wrote: Dim f2 As New FileIOPermission(FileIOPermissionAccess.Write, Server.MapPath("Testdb.mdb"))
f2.AddPathList(FileIOPermissionAccess.Append Or _
FileIOPermissionAccess.Append, Server.MapPath("Testdb.mdb"))
This code does not help in this case as the user does not have write permission, for more information see Code Access Security[^]
|
|
|
|
|
Hi,
check the properties of .mdb file.
for ex. if its readonly.
same problem came to me when .mdb was readonly.
so check this.
Hope this works.
Nitin...
|
|
|
|
|
Hi everybody ,
Can anybody tell me , how to find printer status in aspx page ?
Is there any method/event or inbuilt library to check it on web-page?
Thanking you.
param
|
|
|
|
|
Hi...
Please go through the following link....
http://www.codeproject.com/csharp/printeroffline.asp
"Walking on water and developing Software on a specification is easy, if
both are frozen..."
|
|
|
|
|
Hi,
While running our website how to hide the icons in the desktop. can someone tell me how to hide the icons.
Thank you.
|
|
|
|
|
You want to hide the icons on the desktop of a machine that is browsing your site in IE ? Why ? There's no way to do this without some sort of warning being shown to the end user, you're gonna have to write a program and trust that your users will install it. No way are you gonna be able to do that in javascript.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Actually am trying to create a transparent webpage.
if the icons are there in the desktop my web page can't be viewed properly.
that's why i asked how to hide the icons from the desktop???
and if you know how to set the transparency of the browser, please share it with me.
Thank you for your reply.
|
|
|
|