|
You can pass <asp:button id="button1" runnat="server">
that is
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
Me.TextBox1.Text="Hello"
End Sub
only to <asp:textbox runnat="server" id="textbox1"> (Server side textbox)
You cannot pass to (This is client side textbox)
|
|
|
|
|
you can use javascript to establish this.
onClick = " document.getElementById('txtid).value = 'abcdef';"
add the above statement in the HTML code of your button.
Best Regards,
Haissam Abdul Malak
My Blog
|
|
|
|
|
Thanks for the reply from both of you... I have the idea d.
|
|
|
|
|
hello Everybody,
I have a problem related to MS-Access in ASP .NET while inserting into the table
here is the snapshot of the code,
con.open()
tempstr="insert into stud values('" & t1.text & "','" & t2.text & "','" & t3.text & "','" & t4.text & "')"
com=new oledbcommand(tempstr,con)
''dim dr as oledbdatareader
com.executenonquery()
con.close()
this is the query i m usings and the data type is string for all of them 0
insert into stud values('asdfas','asdf','asdfs','asdfas');
I get the following error.
Operation must use an updateable query.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.OleDb.OleDbException: Operation must use an updateable query.
Source Error:
Line 40: com=new oledbcommand(tempstr,con)
Line 41: ''dim dr as oledbdatareader
Line 42: com.executenonquery()
Line 43: con.close()
Line 44: rebind()
Thank you in advance
Sarguna
|
|
|
|
|
You need to change the file permissions on the database file so that the user account used to run the code (usually IIS_WPG or ASPNET) has write permission to the file.
---
It's amazing to see how much work some people will go through just to avoid a little bit of work.
|
|
|
|
|
Thank u for ur answer.Please give me the details about How will i give database permissions
|
|
|
|
|
Open the propertied for the file, go to the Security tab, add the accound if it doesn't exist, check the Modify checkbox.
If you have simple file sharing enabled, you have to disable that first (in the folder options in Explorer) to get the Security tab.
---
It's amazing to see how much work some people will go through just to avoid a little bit of work.
|
|
|
|
|
Iwant sample application for GDI where I can cut and paste image and resize it in specific size.
ViCkY
|
|
|
|
|
So, you want someone to write the code, so you can paste it into your program?
You must be kidding.
|
|
|
|
|
i am making web application using C# and asp.net(Visual studio 2005). i am making web page where every time new customer code generated automatically.as i have written code in page_load() event for the same.now there is edit button that is meant to show the detail of existing customer. but my problem is when i click on edit. it again go to page_load and does not captures value provided in text box becoz of page load event.Now my question is to know whether i can able to restrict page_load event ? Am i right in my approach?. or is there any other way of doing so?
Please help
Thanks
regards
imran khan
|
|
|
|
|
Try to have a look at Page.IsPostBack, just use this condition to know what kind of operation you need to do in the page_load()
<br />
if (Page.IsPostBack)<br />
{<br />
}<br />
else<br />
{<br />
}<br />
Tarakeshwar Reddy
MCP, CCIE Q(R&S)
|
|
|
|
|
Thank you very much
thank a lot
regards
imran khan
|
|
|
|
|
I have a aspx page having some text boxes, if i change something on any text box my page is being post back and i have setfocus on same control by which page was refreshed. My question is can i have setfocus on next text box after post back.
Thanx Rajat Bhargava [EITS]
|
|
|
|
|
How to dramatically know that is the app in debug mode or not.
I am creating an code that generates different code depending on if it is in debug mode or not
|
|
|
|
|
#if DEBUG <br />
#else <br />
#endif
Tarakeshwar Reddy
MCP, CCIE Q(R&S)
|
|
|
|
|
send mail using asp.net source code?
|
|
|
|
|
Look up the MailMessage class in the System.Web.Mail namespace (for framework 1.x) or System.Net.Mail namespace (for framework 2.0). There are examples.
---
It's amazing to see how much work some people will go through just to avoid a little bit of work.
|
|
|
|
|
See if this help
Imports System.Web.Mail
Dim msgMail As New MailMessage
msgMail.To = ConfigurationSettings.AppSettings("Mailto")
msgMail.From = ConfigurationSettings.AppSettings("MailFrom")
msgMail.Subject = ConfigurationSettings.AppSettings("MailSubject")
msgMail.BodyFormat = MailFormat.Html
Dim sMsg As String="Tets Mail"
SmtpMail.SmtpServer = ConfigurationSettings.AppSettings("MailServer")
SmtpMail.Send(msgMail)
Amit
|
|
|
|
|
It doesn't help me, I already know how to send mail. Perhaps you should reply to the original poster instead?
---
It's amazing to see how much work some people will go through just to avoid a little bit of work.
|
|
|
|
|
|
hey i have to write a game for web. chess board based, and is interactive between two ppl.so the thing is that i must do it in javascript diplay html and well im using c#. and then i must use ajax to send my moves foreward and backwards. does any one have an exsample of such a project, or advice on how to move foreward from here. i have the basic idea but no idea of how to impliment it
|
|
|
|
|
Hey guys,
I am working on a asp.Net (1.1) site. Basically I need to add a couple of new pages. The page would have a few drop down displaying bgColor options, font options, and text size. Now when the user selects one or all of these options, and click the submit button… I should be able to change the page’s look appropriately. So for instance, if a user selects red for the background, Arial for the font and 10 as the size…on button_click event these properties should apply to the page. Now I am grabbing the value from the drop down ( string currentColor = ddl1.SelectedValue; )
I notices that the page control, doesn’t have the body or html form element, so now how do I apply this color property for example to the entire page. My guess is I’d have to go under HTML mode of aspx page and do it there.
Please suggest what is the best approach here.
Thanks
Tina
|
|
|
|
|
Hi,
Try javascript:
function change_app()
{
var ddl = document.getElementById("DropDownList1")
document.bgColor = ddl.options[ddl.selectedIndex].text
}
And in HTML: onclick event of the button call the function.
Thanks & Regards
Mishra
|
|
|
|
|
Hello Mishra, thanks for your response. One of the requirements is to not use Java script as most screen readers can’t read it to well. Could you tell me how this could be accomplished on the server side (that is either programitically in the code behind or perhaps in html writing server side code in <% block. I’m pretty new to asp.Net and don’t know much about it. Please suggest what should I do.
Thanks
Tina
|
|
|
|
|
Hai,
I had creted webpage where user needs to submit the data regarding software request. I had done with page by creating master page. The data submission is working fine in this page. Here i wrote some client side scripting(Java Script) for validation and they are not working. i placed the client side code in the master page . The question here is that for all the pages inherting the master page, can i place the client side scripting in the master page itself?
i placed the scripting code on the clientclick event of the submit button.But when i click the button its directly inserting data in to database with out on any client side check.
Can you please help me how can i figure out the error regarding this.
Thank you,
Veerendra
|
|
|
|