|
Actually when we disable the droipdown it gives default value.To get the proper value it should not be disabled you have to chose another way for it.
Cheers!!
Brij
|
|
|
|
|
thanks for u reply
i have solved the problem. i just enabled the dropdrown before post back
Er. Jagwinder Singh
|
|
|
|
|
hi
i developed a website and the site is maintained in server say "server1"
and the sqldatabase and a special dll is maintained in another server say "server2" (remote server -- server is located in another place).
now a page in the site requires the object of the special dll placed in server2
i have one option for this
i.e i have to install the software in server1 which provides that special dll and from there i have to access the dll.
do any one have another option for this
plz help me
thanks in advance
Lavan Kumar M
|
|
|
|
|
Please Don't Cross Post. I am already give you the answer.
Look Here[^]
|
|
|
|
|
For the object of the speciall dll u need to add that refence to that dll.Else if it is provided as webservice then u don't need to instaal it just add as a webreference.
Cheers!!
Brij
|
|
|
|
|
I have a master page and two content pages. On the master page I have two buttons and I want to dynamically load either of the content pages depending on which button is clicked. Question 1. Do I put the button click events for the buttons in the site.master.cs file? Question 2. How do I dynamically load the different content pages from their respective click events in the .cs file?
Thanks,
Steve
|
|
|
|
|
Either just navigate to two different pages, or show two different controls in the same page.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
In the content page, You have already specified the ContentPlaceHolder name. So, you just need to open that page on button click. Page will automatically load on the content place holder of master page.
On button Click of master.cs page.
if(Cond1)
response.redirect("page1");
else
response.redirect("page2");
|
|
|
|
|
hi People,
I have one aspx page, but it will take too much time to load.
How to identify, what are the different things went to wrong.
If anybody knows please post the answer.
|
|
|
|
|
Enable tracing on the page; see where your bottlenecks are.
|
|
|
|
|
Could be any of many things. Follow Adam's suggestion
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
Use Fiddler and monitor the HTTP request and response. See which is taking more time. Following the below points can improve the page load time
1 - Less viewstate or compressed viewstate. You can also keep the viewstate on server side.
2 - Avoid tables to layout your page. If you are using, make sure the whole content is wrapped in a table tag. Browsers can render page only when it gets the closing tag. So if you keep all your content in a big table, browser won't be able to render the page until it gets the closing tag which is at end of the page.
3 - Use delay loading. Load only the items which are required.
Hope this helps
|
|
|
|
|
One thing,
Use standard guidelines when coding.Optimum use of BrowserCache.
Page should not take more than 3 sec.Use ajax.If page is too heavy then break it in multiple pages.
Cheers!!
Brij
|
|
|
|
|
Hi All
Would greatly appreciate if anyone can come out with a solution for my requirement. I have a form where i can apply leave, and as soon i apply(click on button), my calander in outlook should get updated as leave and with description. should be able to work with all versions of outlook.
If i am an approving head and once i approve the leave the leave should get updated in my(approvers) calander mentioning as leave and description.
Thanks in advance
Naina
|
|
|
|
|
Do you mean you want to update outlook on the client, or on the server ? Is this a requirement your rentacoder client invented and you just blindly said yes to ?
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
|
Hi,
i set in the web.config file the user can upload upto 10mb file. but when i tried to test it with more than 10mb and press that upload button, it is not even going to that event and directly showing error in the browser. How can i handle this exception?
Santhapur
|
|
|
|
|
Instead of specifying the maximum filesize in Web.config, check the uploaded file length during your upload event. You can invalidate the control or display an error message if they exceed the maximum filesize.
|
|
|
|
|
thats what my question is .. its not even triggering the upload event .. its directly displaying error... if it triggers the upload button event i can check and do as u said ...
|
|
|
|
|
Hi all,
I have a DetailsView and GridView on one site. The DetailsView contains some TemplateItems with different validators like RequiredFieldValidator or RegularExpressionValidator .
Example:
<asp:detailsview id="DetailsViewInsertUser" runat="server" autogeneraterows="False" xmlns:asp="#unknown">
DataKeyNames="Id" DataSourceID="myDSObj" DefaultMode="Insert"
Caption="Add user" CaptionAlign="Left">
<Fields>
<asp:templatefield headertext="Titel" sortexpression="Titel">
<EditItemTemplate>
<asp:textbox id="TitelTextBox" runat="server" text="<%# Bind("Titel") %>"></asp:textbox>
</EditItemTemplate>
<InsertItemTemplate>
<asp:textbox id="TitelTextBox" runat="server" text="<%# Bind("Titel") %>"></asp:textbox>
<asp:requiredfieldvalidator id="TitelTextBoxRequiredFieldValidator" runat="server">
ControlToValidate="TitelTextBox" ErrorMessage="Error!"
Display="Dynamic">
</asp:RequiredFieldValidator>
</InsertItemTemplate>
<ItemTemplate>
<asp:label id="Label1" runat="server" text="<%# Bind("Titel") %>"></asp:label>
</ItemTemplate>
</asp:TemplateField>
...
</asp:requiredfieldvalidator></asp:templatefield></asp:detailsview>
When I want to edit entries of the GridView and confirm those with an Update HTML Button in the view, the event won't be completed cause the validators block them. So far it's all right.
Now I tried to disable those validation controls via the Enable Attribute of them, but I don't know how iI can access this control via my DetailsViewInsertUser object.
Example:
protected void UserGridView_OnRowEditing(object sender, EventArgs e)
{ ((RegularExpressionValidator)UserGridView.Controls.FindControl("EMailTextBoxRegexValidator")).Enabled = false; }
Does somebody know how it works?
Cheers
Jerry
|
|
|
|
|
I got it!
((RegularExpressionValidator)DetailsViewInsertUser.Controls[0].FindControl("EMailTextBoxRegexValidator")).Enabled = false;
|
|
|
|
|
Hi all,
I have been struggling to get this done but it has drilled a nail in my head.
I have a grid as foll:
<asp:GridView ID="Grid_Results" runat="server" AutoGenerateColumns="False">
<Columns>
<asp:BoundField DataField="loc" HeaderText="supplocid" SortExpression="loc" />
<asp:BoundField DataField="to_loc_ID" HeaderText="destlocid" SortExpression="destlocid" />
<asp:BoundField DataField="frm_loc" HeaderText="Source" SortExpression="frm_loc" />
<asp:BoundField DataField="to_loc" HeaderText="Destination" SortExpression="to_loc" />
<asp:BoundField DataField="amt_with_tax" HeaderText="Value(with Tax)" SortExpression="amt_with_tax"
DataFormatString="{0:f}" HtmlEncode="False">
<ItemStyle HorizontalAlign="Right" />
</asp:BoundField>
<asp:BoundField DataField="amt_wo_tax" HeaderText="Value(without Tax)" SortExpression="amt_wo_tax"
DataFormatString="{0:f}" HtmlEncode="False">
<ItemStyle HorizontalAlign="Right" />
</asp:BoundField>
<asp:BoundField DataField="totcld" HeaderText="Total CLD`s" SortExpression="totcld" />
<asp:BoundField DataField="freight" HeaderText="Freight" SortExpression="freight" />
</Columns>
<EmptyDataTemplate>
<asp:Label runat="server" ID="EDL" Text="Sorry!!! No Records found"></asp:Label>
</EmptyDataTemplate>
<RowStyle CssClass="datagrid_row1" />
<HeaderStyle CssClass="datagrid_heading" />
</asp:GridView>
and
the code i m using is as follows
Protected Sub Button_Search_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button_Search.Click
Dim cmd As New SqlCommand()
cmd.Connection = con
cmd.CommandType = CommandType.StoredProcedure
cmd.CommandText = "Blah Blah"
Dim loc As String = Nothing
If DDL_Location.SelectedValue <> "0" Then
loc = DDL_Location.SelectedValue
End If
frmdate = DateTime.ParseExact(TextBox_Date_From.Text, "dd/MM/yyyy", System.Globalization.CultureInfo.CurrentCulture)
todate = DateTime.ParseExact(TextBox_Date_To.Text, "dd/MM/yyyy", System.Globalization.CultureInfo.CurrentCulture)
cmd.Parameters.Add(New SqlParameter("@Fromdate", frmdate))
cmd.Parameters.Add(New SqlParameter("@todate", todate))
cmd.Parameters.Add(New SqlParameter("@source_loc", loc))
sda = New SqlDataAdapter
sda.SelectCommand = cmd
ds = New DataSet
sda.Fill(ds)
If ds.Tables(0).Rows.Count > 0 Then
Dim caption As String = ""
caption = "From date: " + frmdate.ToLongDateString + " To date: " + todate.ToLongDateString
Grid_Results.Caption = "<b>" + caption + "</b>"
Else
Grid_Results.Caption = String.Empty
End If
Grid_Results.DataSource = ds
Grid_Results.DataBind()
If ds.Tables(0).Rows.Count > 0 Then
Button_Export.Visible = True
Button_Export_All.Visible = True
Else
Button_Export.Visible = False
Button_Export_All.Visible = False
End If
End Sub
can anyone get this code working!!!!!
When you fail to plan, you are planning to fail.
|
|
|
|
|
www.Developerof.NET wrote: can anyone get this code working!!!!!
What is the problem? Did you try to debug it? what is the error ?
|
|
|
|
|
The prob is that the Empty data template is not showing. Nothing is displayed. Its all blank.
When i viewed the html source the grid renders as follows
<table cellspacing="0" rules="all" border="1" id="Grid_Results" style="border-collapse:collapse;">
<tr>
</tr>
</table>
ie
no text between the TR`s
no TD`s
When you fail to plan, you are planning to fail.
|
|
|
|
|
Hi
I'm writing a web app to upload up to 4 images to a folder. I also have a drop-down list so the user can choose whether pic is picture 1, 2, 3 or 4 (to set order on page display). Anyway, when one picture is uploaded the user stays in the form to add more pictures. I clear the DDL and re-populate it depending on which pictures have already been uploaded - i.e if pic 1 has been uploaded, only pic 2, 3 and 4 appear in drop-down. To determine this I use File.Exists but this doesn't seem to be working on a postback (i.e it doesn't find pic1.jpg which I have uploaded. It works however, if I leave the page and then click to add an image later - could this be an issue of the folder not refreshing so it looks like the file doesn't exist or a postback problem? Any ideas would be greatly appreciated.
Thanks
Lorna
|
|
|
|