|
There is a problem if you use window.open() , because most pop-up blockers block window.open() , whether it is legit or not.
|
|
|
|
|
Hi
This is probably a dumb question But ..
I have an input form with multiple text box input fields
Some of the input fields have a background colour of yellow and some are white.
Can any one tell me why some fields are yellow and how I can stop it.
Thanks
|
|
|
|
|
Select the input fields and set the BackColor property to White. This will mean no matter what, your field background should be white.
|
|
|
|
|
|
Google Toolbar highlights fields in Yellow that it thinks it can fill in for you. This might be what you're seeing.
|
|
|
|
|
An Automatic Form Filler like Google Toolbar's seems to be active.
|
|
|
|
|
I want to display the text in the same form when submit btn is clicked.i need to display the image along with the text.i have 2 dropdown boxes n a text field.as i am new to ASp.net Programming
thanks in advance
|
|
|
|
|
Hi,
I'm going to assume that you are passing the text to the age through the page parameter "showtext" (page.aspx?showtext="what to show").
This first example has a button that shows the text:
Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
Response.Redirect("ThisPage.aspx?showtext=text")
End Sub
Sub Label1_PreRender(ByVal sender As Object, ByVal e As System.EventArgs) Handles Label1.PreRender
If Request.QueryString("showtext") <> Nothing Or Request.QueryString("showtext") <> "" Then
Label1.Text = request.QueryString("showtext")
End If
End Sub
To show the Image, I assume that you are passing the image location through the parameter "imageloc". It also has the button:
Sub Button1_Click(ByVal sender As Object, byVal e As System.EventArgs) Handles Button1.Click
Response.Redirect("ThisPage.aspx?imageloc=image1.png")
End Sub
Sub PictureBox1_PreRender(ByVal sender As Object, ByVal e As System.EventArgs) Handles PictureBox1.PreRender
If Request.QueryString("imageloc") <> Nothing Or Request.QueryString("imageloc") Then
PictureBox1.ImageLocation = Request.QueryString("imageloc")
End If
End Sub
|
|
|
|
|
Thanks for Your reply but i am using label to display text with Image.i have given the path for the image but i want to display the text on btn click which is retrived frm database.i have givenu small piece of code below
protected void btnSubmit_Click(object sender, EventArgs e)
{
try
{
if (lblDisplayText.Text = "" && ddlsunsign.Text = "Aries")
{
return "../../DesignTier/SignImages/ariesstat.jpg";
}
.
.
.
.
.
.
}
catch (Exception ex)
{
ex.Message;
}
}
it wuld b very helpful for me if possible give code in C#.
Thanks in Advance.
|
|
|
|
|
Sorry
You could try this:
public string GetImagePath()
{
switch (ddlsunsign.Text) {
case Aries:
return "../../DesignTier/SignImages/ariesstat.jpg";
case Aquarius:
return "../../DesignTier/SignImages/aquariusstat.jpg";
case default:
return null;
}
}
public string GetStat()
{
switch (ddlsunsign.text) {
case Aries:
return
case default:
return null;
}
protected void btnSubmit_Click(object sender, EventArgs e)
{
if (GetImagePath()!=null&&GetStat()!=null) {
Response.Redirect("ThisPage.aspx?imageloc=\"" + GetImagePath + "\"&text=\"" + GetStat() + "\"");
}
}
protected void descriptionLabel_PreRender(object sender, EventArgs e)
{
if (Request.QueryString("text")!=null) {
descriptionLabel.Text = Request.QueryString;
}
else {
descriptionLabel.Text = "Error";
}
}
protected void signImage_PreRender(object sender, EventArgs e)
{
if (Request.QueryString("imageloc")!=null) {
signImage.ImageLocation = Request.QueryString("imageloc");
else {
signImage.ImageLocation =
}
}
|
|
|
|
|
Here is the old code in C#:
protected void button1_Click(Object sender, EventArgs e) {
Response.Redirect("ThisPage.aspx?showtext=text&imageloc=loc");
}
protected void label1_PreRender(object sender, EventArgs e) {
if (Request.QueryString("showtext")!=null||Request.QueryString("showtext")!="") {
label1.Text = request.QueryString("showtext");
}
}
protected void pictureBox1_PreRender(object sender, EventArgs e) {
if (Request.QueryString("imageloc")!=null||Request.QueryString("showtext")!="") {
pictureBox1.ImageLocation = Request.QueryString("imageloc");
}
}
|
|
|
|
|
Hi
I have created a form view which allows records to be inserted to a table.
The insert code is automatically generated by data Source Definition.
When I select the insert button the data on the form disappears but the table is not updated.
How can I debug automatically generated insert code and how can I display SQL log to see
what happening ?
Thanks
|
|
|
|
|
if you are using sql server then use sql profiler.
Regards
Shajeel
|
|
|
|
|
I am using SQL Express is there a SQL Profiler available for this product and how do I start it ?
I don't have the option in my available programs
|
|
|
|
|
Hi,
I am looking for a way to insert text into a TextBox at the current position, as I am trying to make an site to create web pages with Google stuff (like Maps, Search).
I know that you can do
TextBox1.Text.Insert(1, New IO.StreamReader("Maps.txt").ReadToEnd) , but I need to replace 1 with the current cursor position in the TextBox.
It is being written in VB, but I can do a little bit of C#.
Thanks
|
|
|
|
|
hi guys i was just wondering if vb.net can use the standard provider feature of asp.net(the one taht allow user to login logout, rolemanagement)
and how
thx
|
|
|
|
|
Are you asking if you can use the default providers in windows application ?
Regards,
Jaiprakash M Bankolli
jaiprakash.bankolli@gmail.com
http://jaiprakash.blog.com/
|
|
|
|
|
|
This is bit tricky, Need to look at it. In the mean time if you come across the solution let me know !!
Regards,
Jaiprakash M Bankolli
jaiprakash.bankolli@gmail.com
http://jaiprakash.blog.com/
|
|
|
|
|
no problem will do more research about it
|
|
|
|
|
Hi,
I have a doubt on uploading some files to the server, here's my codes
Dim fn As String = System.IO.Path.GetFileName(Me.flPrintScreen.PostedFile.FileName)
Dim SaveLocation As String = "\\\\10.xx.xx.xx\\MyFolder\\" & fn
If Not fn = "" Then
Me.flPrintScreen.PostedFile.SaveAs(SaveLocation)
End If
It works well on my development machine which the file is being uploaded to the server. But I wonder when I put it up on the Internet, whether the way I am using now is workable since this seems like mapping the drive locally.
Thanks.
J Liang
|
|
|
|
|
First and foremost check permission for the IUSER needs to be set properly for the shared drive !!! Let me know in case if you get some error !!
Regards,
Jaiprakash M Bankolli
jaiprakash.bankolli@gmail.com
http://jaiprakash.blog.com/
|
|
|
|
|
Hi Jaiprakash,
So as long as the permission is given, the code should work when I upload it to the server to be access by the user?
J Liang
|
|
|
|
|
Can you past the exact error message?
Regards,
Jaiprakash M Bankolli
jaiprakash.bankolli@gmail.com
http://jaiprakash.blog.com/
|
|
|
|
|
Hi Jaiprakash,
Actually there is no error message though, it works fine, the files are being uploaded accordingly, my concern is whether this would happen the same way when I uploaded my web pages to the server.
J Liang
|
|
|
|