|
It's amazing to me, some of the fantasy that goes on in this forum. If you have a web site, people who use the site cannot see your C#/VB/SQL code. If you are giving the website code to someone to deploy, you can't stop them reading it. There is NO way you can stop users from reading your javascript/css/html, if they want to. The browser cannot run code it cannot see.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Try googling 'precompile'
ma tju
Pengaturcara Perisian
Subang Jaya,Selangor, Malaysia
Ring Master SB MVP 2008
Subang Jaya MOP (Otai)
|
|
|
|
|
I have a textbox and a button. When i enter something in textbox and press "enter" key, i need to fire the button's click event. Can anyone pls help?
|
|
|
|
|
Wrap a panel around these two controls and then in the Panel write this: DefaultButton="YourButtonIdHere"
|
|
|
|
|
Thanks for the reply. But unfortunately it doesnt work. Any other ideas?
|
|
|
|
|
Set it as Default submit button for the form
<br />
<form id="form1" runat="server" defaultbutton="Button2"><br />
|
|
|
|
|
Thanks. But the page is a content holder. So I couldnot use the Form tag.
|
|
|
|
|
Me.Page.Form.DefaultButton = "ControlID"
|
|
|
|
|
Hi this is the first time I've posted something
Can someone please help me
I have a c1webgrid with a vertical scrollbar
I'm searching for a certain string in the webgrid
when the string is found I select the item , changing the selected index highlighting the item
the problem now is that I want the scroll position of the webgrid to change to the selected item
How do I do this???
|
|
|
|
|
|
I need the gridview to automatically scroll down to the found record
|
|
|
|
|
Is there really nobody that can help me with this,
all i need to do is programmaticaly scroll the webgrid to a
possition I give it
|
|
|
|
|
Dear i want to add drop down list on selected index change event of another drop down list. I am to add third one. Please help.
Here is the code.
protected void Page_Load(object sender, EventArgs e)
{
DropDownList ddl = new DropDownList();
ddl.ID = "ddl1";
ddl.Items.Add("Item1");
ddl.Items.Add("Item2");
ddl.Items.Add("Item3");
Form.Controls.Add(ddl);
ddl.AutoPostBack = true; // if False ddl_index event handler will not be called.
ddl.SelectedIndexChanged +=new EventHandler(dd1_index);
}
protected void dd1_index(object sender, EventArgs e)
{
DropDownList ddl2 = new DropDownList();
ddl2.ID = "ddl2";
ddl2.Items.Add("Item4");
ddl2.Items.Add("Item5");
ddl2.Items.Add("Item6");
Form.Controls.Add(ddl2);
/*if set to true control disappears.
* But in ddl2.AutoPostBack = false; or ddl2.AutoPostBack = true;
* both cases dd2_index event handler not called.*/
ddl2.AutoPostBack = false;
ddl2.SelectedIndexChanged += new EventHandler(dd2_index);
}
protected void dd2_index(object sender, EventArgs e)
{
DropDownList ddl3 = new DropDownList();
ddl3.ID = "ddl2";
ddl3.Items.Add("Item4");
ddl3.Items.Add("Item5");
ddl3.Items.Add("Item6");
Form.Controls.Add(ddl3);
ddl3.AutoPostBack = false;
ddl3.SelectedIndexChanged += new EventHandler(dd3_index);
}
protected void dd3_index(object sender, EventArgs e)
{
DropDownList ddl4 = new DropDownList();
ddl4.ID = "ddl2";
ddl4.Items.Add("Item7");
ddl4.Items.Add("Item8");
ddl4.Items.Add("Item9");
Form.Controls.Add(ddl4);
ddl4.AutoPostBack = false;
ddl4.Visible = true;
ddl4.SelectedIndexChanged += new EventHandler(dd3_index);
}
Waiting anxiously for your reply.
|
|
|
|
|
Ist Glance code seems fine just give unique ID's to dropdown ,we'll see it 2 morrow
ddl3.ID = "ddl3";
ddl4.ID = "ddl4";
|
|
|
|
|
That's a mistake in doing copy paste of my code. Thanks for the correction.But the problem is that i have to create the dropdown lists on selected index change. The code in dd3_indx and dd4_indx do not execute so the ID's are not a big issue. I need solution or pointers.
|
|
|
|
|
Hi, I have to display images from a folder in imagefield. I am using following code but its not showing the image. Please help!
DataTable dt = new DataTable();
dt.Columns.Add("NeckLace", typeof(string));
DataRow dr;
int i = 1;
foreach (string file in Directory.GetFiles(Server.MapPath(@"NeckLace\")))
{
dr = dt.NewRow();
dr[0] = ResolveUrl(file);
dt.Rows.Add(dr);
i += 1;
}
GridView1.DataSource = dt;
GridView1.DataBind();
|
|
|
|
|
You may have to catch that in the databound event possibly and add a literal control with the image tag pointing to where it should go?
Revolutionary: Disk drives go round and round.
|
|
|
|
|
|
I am having difficulty launch a form submit event after adding a postbackurl attribute to an imagebutton in asp.net. See code below.
I have a Login Button with an 'onclick event'... ie. see below:
************
<asp:imagebutton id="LoginButton" runat="server" text="Log In" validationgroup="Login1" imageurl="~/images/login_up.gif" onclick="LoginButton_Click1" xmlns:asp="#unknown">
************
My Event is as follows (code behind - vb):
******************
Protected Sub LoginButton_Click1(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs)
If (Left(Me.Login1.UserName, 6).ToLower = "domain") Then
Dim LoginButton As System.Web.UI.WebControls.ImageButton
LoginButton = CType(Login1.FindControl("LoginButton"), ImageButton)
LoginButton.Attributes.Add("PostBackUrl", "http://internalusersite.anyname.com/Portal/AdminLogin.aspx")
'need an event to submit the form after adding the attribute
Else
Dim LoginButton As System.Web.UI.WebControls.ImageButton
LoginButton = CType(Login1.FindControl("LoginButton"), ImageButton)
LoginButton.Attributes.Add("PostBackUrl", "http://externalusersite.anyname.com/Portal/AdminLogin.aspx")
'need an event to submit the form after adding attribute
End If
|
|
|
|
|
Hi,
I am also facing the same problem, did you get the solution for this?
|
|
|
|
|
Hi,
I got a quick question here, I'm using .NET 2.0 here and I've just seen a tool called SOAP UI. My problem is that we're working in a project which is based on a web service that is not accessible from where we r right now (So basically we're on dry runs here ). So we're thinking about finding a solution to make a mock up of that web service over there and some how (if possible) use it in our project to carry on the development work easily. I hope some of you folks out there might be able to better guide me in this scenario. Can some buddy plz tell me if this is possible if we could have some one create a mockup of that web service there and send it to us so that we can use that mock up as if it were that web service.
Hope I got my point cleared.
Thanks in advance
|
|
|
|
|
i have 2 different folders.
Admin folder and Images folder.
Admin folder has just manage.aspx form.(Images folder not in that folder)
i want to display my pics in Admin/manage.aspx page.But my images are in
Images folder.
<eit:LightBoxHyperlink ID="lb1" runat="server" Album="Sample1" Caption="Gallery 1 Pic 1"
ThumbnailUrl='<#"~/Images/"+DropDownList1.SelectedValue+"/Thumbnail/"+DataBinder.Eval(Container.DataItem,"small") %>' Height="84px" Width="113px" style="vertical-align: middle; text-align: center" />
it searches my images under the :Admin/Images.... (so i get error message)
But images under Images/..
|
|
|
|
|
Use like this
<br />
ThumbnailUrl='<../images/AddChildWBSCode.gif>'<br />
|
|
|
|
|
But i must use databinding.
ThumbnailUrl='<%#"Images/"+DropDownList1.SelectedValue+"/Thumbnail/"+DataBinder.Eval(Container.DataItem,"small") %>'
i dont display just one image.i use database.
|
|
|
|
|
Hi Mir,
No Problem write like this
ThumbnailUrl='<%#"../Images/"+DropDownList1.SelectedValue+"/Thumbnail/"+DataBinder.Eval(Container.DataItem,"small") %>'
|
|
|
|